commit
stringlengths
40
40
old_file
stringlengths
4
112
new_file
stringlengths
4
112
old_contents
stringlengths
0
2.05k
new_contents
stringlengths
28
3.9k
subject
stringlengths
17
736
message
stringlengths
18
4.78k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
7
111k
af8d245e930bc98823814813db06b9bcbe8a737d
sys/sparc64/include/clock.h
sys/sparc64/include/clock.h
/*- * Copyright (c) 2001 Jake Burkholder. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ extern u_long tick_increment; extern u_long tick_freq; extern u_long tick_MHz; #endif /* !_MACHINE_CLOCK_H_ */
/*- * Copyright (c) 2001 Jake Burkholder. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ extern u_long tick_increment; extern u_long tick_freq; extern u_long tick_MHz; int sysbeep(int, int); #endif /* !_MACHINE_CLOCK_H_ */
Add a missing prototype to fix a warning.
Add a missing prototype to fix a warning.
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
7fbe3e2d97dc4db70a87e57d387f60ac6e659609
interpreter/cling/include/cling/Interpreter/CIFactory.h
interpreter/cling/include/cling/Interpreter/CIFactory.h
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // author: Axel Naumann <[email protected]> // // This file is dual-licensed: you can choose to license it under the University // of Illinois Open Source License or the GNU Lesser General Public License. See // LICENSE.TXT for details. //------------------------------------------------------------------------------ #ifndef CLING_CIFACTORY_H #define CLING_CIFACTORY_H #include "clang/Frontend/CompilerInstance.h" #include "llvm/ADT/StringRef.h" namespace llvm { class LLVMContext; class MemoryBuffer; } namespace clang { class DiagnosticsEngine; } namespace cling { class DeclCollector; class CIFactory { public: // TODO: Add overload that takes file not MemoryBuffer static clang::CompilerInstance* createCI(llvm::StringRef code, int argc, const char* const *argv, const char* llvmdir); static clang::CompilerInstance* createCI(llvm::MemoryBuffer* buffer, int argc, const char* const *argv, const char* llvmdir, DeclCollector* stateCollector); private: //--------------------------------------------------------------------- //! Constructor //--------------------------------------------------------------------- CIFactory() {} ~CIFactory() {} static void SetClingCustomLangOpts(clang::LangOptions& Opts); static void SetClingTargetLangOpts(clang::LangOptions& Opts, const clang::TargetInfo& Target); }; } // namespace cling #endif // CLING_CIFACTORY_H
//--------------------------------------------------------------------*- C++ -*- // CLING - the C++ LLVM-based InterpreterG :) // author: Axel Naumann <[email protected]> // // This file is dual-licensed: you can choose to license it under the University // of Illinois Open Source License or the GNU Lesser General Public License. See // LICENSE.TXT for details. //------------------------------------------------------------------------------ #ifndef CLING_CIFACTORY_H #define CLING_CIFACTORY_H #include "clang/Frontend/CompilerInstance.h" #include "llvm/ADT/StringRef.h" namespace llvm { class LLVMContext; class MemoryBuffer; } namespace clang { class DiagnosticsEngine; } namespace cling { class DeclCollector; class CIFactory { public: // TODO: Add overload that takes file not MemoryBuffer static clang::CompilerInstance* createCI(llvm::StringRef code, int argc, const char* const *argv, const char* llvmdir); static clang::CompilerInstance* createCI(llvm::MemoryBuffer* buffer, int argc, const char* const *argv, const char* llvmdir, DeclCollector* stateCollector); private: //--------------------------------------------------------------------- //! Constructor //--------------------------------------------------------------------- CIFactory() = delete; ~CIFactory() = delete; }; } // namespace cling #endif // CLING_CIFACTORY_H
Remove unneeded static member decls; mark c'tor, d'tor as deleted.
Remove unneeded static member decls; mark c'tor, d'tor as deleted.
C
lgpl-2.1
arch1tect0r/root,zzxuanyuan/root-compressor-dummy,abhinavmoudgil95/root,veprbl/root,arch1tect0r/root,zzxuanyuan/root,gbitzes/root,bbockelm/root,karies/root,sbinet/cxx-root,simonpf/root,beniz/root,sawenzel/root,georgtroska/root,karies/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,omazapa/root-old,bbockelm/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,pspe/root,davidlt/root,omazapa/root,gganis/root,krafczyk/root,nilqed/root,Duraznos/root,dfunke/root,gganis/root,thomaskeck/root,dfunke/root,davidlt/root,sbinet/cxx-root,arch1tect0r/root,abhinavmoudgil95/root,agarciamontoro/root,vukasinmilosevic/root,agarciamontoro/root,Duraznos/root,simonpf/root,bbockelm/root,omazapa/root,dfunke/root,Y--/root,evgeny-boger/root,perovic/root,esakellari/root,omazapa/root-old,BerserkerTroll/root,gganis/root,abhinavmoudgil95/root,agarciamontoro/root,krafczyk/root,satyarth934/root,jrtomps/root,Duraznos/root,pspe/root,mkret2/root,dfunke/root,mkret2/root,sirinath/root,karies/root,evgeny-boger/root,root-mirror/root,perovic/root,dfunke/root,sbinet/cxx-root,omazapa/root,arch1tect0r/root,abhinavmoudgil95/root,Y--/root,gbitzes/root,evgeny-boger/root,omazapa/root,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,mattkretz/root,omazapa/root,abhinavmoudgil95/root,thomaskeck/root,simonpf/root,gganis/root,georgtroska/root,esakellari/root,simonpf/root,arch1tect0r/root,mattkretz/root,olifre/root,mhuwiler/rootauto,BerserkerTroll/root,pspe/root,sirinath/root,olifre/root,gbitzes/root,nilqed/root,mkret2/root,satyarth934/root,sbinet/cxx-root,Duraznos/root,perovic/root,Y--/root,esakellari/root,bbockelm/root,veprbl/root,sawenzel/root,root-mirror/root,nilqed/root,jrtomps/root,sirinath/root,bbockelm/root,thomaskeck/root,dfunke/root,zzxuanyuan/root-compressor-dummy,root-mirror/root,mhuwiler/rootauto,jrtomps/root,vukasinmilosevic/root,zzxuanyuan/root,abhinavmoudgil95/root,root-mirror/root,jrtomps/root,gbitzes/root,thomaskeck/root,simonpf/root,davidlt/root,root-mirror/root,simonpf/root,gbitzes/root,CristinaCristescu/root,nilqed/root,CristinaCristescu/root,buuck/root,omazapa/root-old,bbockelm/root,dfunke/root,root-mirror/root,satyarth934/root,zzxuanyuan/root,omazapa/root,veprbl/root,BerserkerTroll/root,Duraznos/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,zzxuanyuan/root,mattkretz/root,bbockelm/root,olifre/root,bbockelm/root,perovic/root,beniz/root,gbitzes/root,Y--/root,karies/root,georgtroska/root,buuck/root,nilqed/root,jrtomps/root,jrtomps/root,sirinath/root,perovic/root,buuck/root,davidlt/root,pspe/root,vukasinmilosevic/root,pspe/root,buuck/root,mhuwiler/rootauto,esakellari/root,esakellari/my_root_for_test,sawenzel/root,evgeny-boger/root,gganis/root,sirinath/root,zzxuanyuan/root,beniz/root,beniz/root,esakellari/root,agarciamontoro/root,nilqed/root,zzxuanyuan/root,gbitzes/root,satyarth934/root,davidlt/root,Y--/root,zzxuanyuan/root,CristinaCristescu/root,simonpf/root,vukasinmilosevic/root,CristinaCristescu/root,esakellari/root,evgeny-boger/root,Y--/root,mhuwiler/rootauto,agarciamontoro/root,gbitzes/root,BerserkerTroll/root,sbinet/cxx-root,root-mirror/root,georgtroska/root,evgeny-boger/root,abhinavmoudgil95/root,lgiommi/root,sirinath/root,sbinet/cxx-root,beniz/root,zzxuanyuan/root-compressor-dummy,vukasinmilosevic/root,mattkretz/root,thomaskeck/root,agarciamontoro/root,sawenzel/root,olifre/root,esakellari/root,omazapa/root-old,perovic/root,omazapa/root-old,sawenzel/root,simonpf/root,karies/root,arch1tect0r/root,simonpf/root,beniz/root,agarciamontoro/root,CristinaCristescu/root,davidlt/root,gganis/root,mkret2/root,davidlt/root,jrtomps/root,lgiommi/root,omazapa/root-old,omazapa/root-old,CristinaCristescu/root,evgeny-boger/root,sirinath/root,vukasinmilosevic/root,esakellari/my_root_for_test,evgeny-boger/root,olifre/root,krafczyk/root,krafczyk/root,perovic/root,esakellari/root,arch1tect0r/root,gganis/root,mattkretz/root,omazapa/root-old,dfunke/root,omazapa/root,sawenzel/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,Duraznos/root,perovic/root,georgtroska/root,sbinet/cxx-root,abhinavmoudgil95/root,CristinaCristescu/root,Duraznos/root,olifre/root,BerserkerTroll/root,krafczyk/root,gbitzes/root,vukasinmilosevic/root,esakellari/my_root_for_test,mkret2/root,veprbl/root,perovic/root,BerserkerTroll/root,davidlt/root,thomaskeck/root,simonpf/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,esakellari/root,evgeny-boger/root,karies/root,satyarth934/root,sbinet/cxx-root,gganis/root,root-mirror/root,georgtroska/root,veprbl/root,nilqed/root,sirinath/root,mhuwiler/rootauto,georgtroska/root,lgiommi/root,evgeny-boger/root,davidlt/root,dfunke/root,abhinavmoudgil95/root,esakellari/root,sbinet/cxx-root,vukasinmilosevic/root,veprbl/root,Y--/root,olifre/root,thomaskeck/root,beniz/root,sirinath/root,mkret2/root,omazapa/root-old,mattkretz/root,buuck/root,lgiommi/root,thomaskeck/root,jrtomps/root,pspe/root,mattkretz/root,esakellari/my_root_for_test,krafczyk/root,lgiommi/root,sirinath/root,sbinet/cxx-root,karies/root,thomaskeck/root,mhuwiler/rootauto,jrtomps/root,lgiommi/root,georgtroska/root,omazapa/root,veprbl/root,gbitzes/root,veprbl/root,abhinavmoudgil95/root,zzxuanyuan/root,mhuwiler/rootauto,evgeny-boger/root,mattkretz/root,BerserkerTroll/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,Y--/root,mattkretz/root,jrtomps/root,satyarth934/root,krafczyk/root,georgtroska/root,buuck/root,gganis/root,BerserkerTroll/root,buuck/root,olifre/root,zzxuanyuan/root,satyarth934/root,karies/root,beniz/root,satyarth934/root,perovic/root,agarciamontoro/root,BerserkerTroll/root,esakellari/my_root_for_test,mkret2/root,mhuwiler/rootauto,pspe/root,root-mirror/root,CristinaCristescu/root,sawenzel/root,nilqed/root,dfunke/root,sawenzel/root,esakellari/my_root_for_test,Y--/root,esakellari/root,sbinet/cxx-root,veprbl/root,mattkretz/root,nilqed/root,sawenzel/root,buuck/root,pspe/root,BerserkerTroll/root,agarciamontoro/root,root-mirror/root,omazapa/root,gganis/root,karies/root,vukasinmilosevic/root,esakellari/my_root_for_test,bbockelm/root,omazapa/root,Y--/root,sawenzel/root,mkret2/root,CristinaCristescu/root,agarciamontoro/root,dfunke/root,krafczyk/root,zzxuanyuan/root,olifre/root,satyarth934/root,omazapa/root,thomaskeck/root,satyarth934/root,omazapa/root-old,karies/root,zzxuanyuan/root,satyarth934/root,vukasinmilosevic/root,krafczyk/root,esakellari/my_root_for_test,abhinavmoudgil95/root,nilqed/root,sawenzel/root,karies/root,pspe/root,beniz/root,olifre/root,beniz/root,simonpf/root,buuck/root,davidlt/root,krafczyk/root,sirinath/root,esakellari/my_root_for_test,veprbl/root,buuck/root,pspe/root,arch1tect0r/root,Duraznos/root,mattkretz/root,perovic/root,krafczyk/root,mhuwiler/rootauto,georgtroska/root,Duraznos/root,lgiommi/root,arch1tect0r/root,CristinaCristescu/root,mkret2/root,veprbl/root,CristinaCristescu/root,pspe/root,olifre/root,buuck/root,mkret2/root,lgiommi/root,gbitzes/root,esakellari/my_root_for_test,vukasinmilosevic/root,jrtomps/root,BerserkerTroll/root,zzxuanyuan/root,mhuwiler/rootauto,mkret2/root,davidlt/root,gganis/root,root-mirror/root,beniz/root,Y--/root,georgtroska/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,lgiommi/root,nilqed/root,arch1tect0r/root
607893ef3f8ff351c68e8a057704d40a34c56872
Plugins/Displays/Bezel/GrowlBezelWindowView.h
Plugins/Displays/Bezel/GrowlBezelWindowView.h
// // GrowlBezelWindowView.h // Display Plugins // // Created by Jorge Salvador Caffarena on 09/09/04. // Copyright 2004 Jorge Salvador Caffarena. All rights reserved. // #import <Cocoa/Cocoa.h> #import "GrowlNotificationView.h" @interface GrowlBezelWindowView : GrowlNotificationView { NSImage *icon; NSString *title; NSString *text; SEL action; id target; NSColor *textColor; NSColor *backgroundColor; NSLayoutManager *layoutManager; } - (void) setIcon:(NSImage *)icon; - (void) setTitle:(NSString *)title; - (void) setText:(NSString *)text; - (void) setPriority:(int)priority; - (float) descriptionHeight:(NSString *)text attributes:(NSDictionary *)attributes width:(float)width; - (id) target; - (void) setTarget:(id)object; - (SEL) action; - (void) setAction:(SEL)selector; @end
// // GrowlBezelWindowView.h // Display Plugins // // Created by Jorge Salvador Caffarena on 09/09/04. // Copyright 2004 Jorge Salvador Caffarena. All rights reserved. // #import <Cocoa/Cocoa.h> #import "GrowlNotificationView.h" @interface GrowlBezelWindowView : GrowlNotificationView { NSImage *icon; NSString *title; NSString *text; NSColor *textColor; NSColor *backgroundColor; NSLayoutManager *layoutManager; } - (void) setIcon:(NSImage *)icon; - (void) setTitle:(NSString *)title; - (void) setText:(NSString *)text; - (void) setPriority:(int)priority; - (float) descriptionHeight:(NSString *)text attributes:(NSDictionary *)attributes width:(float)width; - (id) target; - (void) setTarget:(id)object; - (SEL) action; - (void) setAction:(SEL)selector; @end
Remove duplicate members so this compiles again
Remove duplicate members so this compiles again --HG-- extra : convert_revision : svn%3A99687598-2e92-11dd-8019-fe7b9d601d1b/trunk%403400
C
bsd-3-clause
PersonifyInc/growl,incbee/Growl,PersonifyInc/growl,incbee/Growl,incbee/Growl,incbee/Growl,PersonifyInc/growl,PersonifyInc/growl,PersonifyInc/growl,incbee/Growl
e595fd5917bd28a939cdf17a347661c00454c3a1
src/bitwise.h
src/bitwise.h
#pragma once #include <cstdint> inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) { return (high << 8) + low; } inline bool check_bit(const uint8_t value, int bit) { return (value & (1 << bit)) != 0; } inline uint8_t set_bit(const uint8_t value, int bit) { return static_cast<uint8_t>(value | (1 << bit)); }
#pragma once #include "util/log.h" #include <cstdint> inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) { return (high << 8) + low; } inline bool check_bit(const uint8_t value, const int bit) { return (value & (1 << bit)) != 0; } inline uint8_t set_bit(const uint8_t value, const int bit) { return value | (1 << bit); } inline uint8_t clear_bit(const uint8_t value, const int bit) { return value & ~(1 << bit); } inline uint8_t set_bit_to(const uint8_t value, const int bit, bool bit_on) { if (bit_on) { return set_bit(value, bit); } else { return clear_bit(value, bit); } }
Add more functions for bit manipulation
Add more functions for bit manipulation
C
bsd-3-clause
jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator
dd84148bdaa2bbecf0be3385a6423e21edbdb690
tess-two/jni/com_googlecode_leptonica_android/stdio/extrastdio.h
tess-two/jni/com_googlecode_leptonica_android/stdio/extrastdio.h
#ifndef LEPTONICA__STDIO_H #define LEPTONICA__STDIO_H #ifndef BUILD_HOST #include <stdio.h> #include <stdint.h> typedef struct cookie_io_functions_t { ssize_t (*read)(void *cookie, char *buf, size_t n); ssize_t (*write)(void *cookie, const char *buf, size_t n); int (*seek)(void *cookie, off_t *pos, int whence); int (*close)(void *cookie); } cookie_io_functions_t; FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t functions); FILE *fmemopen(void *buf, size_t size, const char *mode); FILE *open_memstream(char **buf, size_t *size); #endif #endif /* LEPTONICA__STDIO_H */
#ifndef LEPTONICA__STDIO_H #define LEPTONICA__STDIO_H #ifndef BUILD_HOST #include <stdio.h> #include <stdint.h> typedef struct cookie_io_functions_t { ssize_t (*read)(void *cookie, char *buf, size_t n); ssize_t (*write)(void *cookie, const char *buf, size_t n); int (*seek)(void *cookie, off_t *pos, int whence); int (*close)(void *cookie); } cookie_io_functions_t; FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t functions); FILE *fmemopen(void *buf, size_t size, const char *mode); FILE *open_memstream(char **buf, size_t *size); FILE *__sfp(void); int __sflags(const char *, int *); #endif #endif /* LEPTONICA__STDIO_H */
Fix clang warning about implicit function declaration
Fix clang warning about implicit function declaration
C
apache-2.0
surensth/tess-two,surensth/tess-two,bhargavbhegde7/tess-two,didldum/tess-two,bhargavbhegde7/tess-two,renard314/tess-two,doo/tess-two,panzerfahrer/tess-two,rmtheis/tess-two,rxl194/tess-two,doo/tess-two,rxl194/tess-two,michyliao/tess-two,rmtheis/tess-two,Drakefrog/tess-two,bhargavbhegde7/tess-two,AlanFor301/tess-two,rmtheis/tess-two,didldum/tess-two,rmtheis/tess-two,zoyvever/tess-two,KrtinN/Scion,renard314/tess-two,didldum/tess-two,yummy222/tess-two,rxl194/tess-two,rxl194/tess-two,sirojnurulum/tess-two,didldum/tess-two,yummy222/tess-two,demonquark/tess-two,doo/tess-two,demonquark/tess-two,demonquark/tess-two,wordsforthewise/tess-two,CaveSven/TessTwo,rmtheis/tess-two,wordsforthewise/tess-two,CaveSven/TessTwo,didldum/tess-two,renard314/tess-two,garoxas/tess-two,CaveSven/TessTwo,surensth/tess-two,demonquark/tess-two,bhargavbhegde7/tess-two,michyliao/tess-two,lpalonek/tess-two,JackFan-Z/tess-two,lpalonek/tess-two,KrtinN/Scion,CaveSven/TessTwo,panzerfahrer/tess-two,demonquark/tess-two,doo/tess-two,yummy222/tess-two,bhargavbhegde7/tess-two,JackFan-Z/tess-two,michyliao/tess-two,sirojnurulum/tess-two,AlanFor301/tess-two,sirojnurulum/tess-two,lpalonek/tess-two,doo/tess-two,zoyvever/tess-two,yummy222/tess-two,JackFan-Z/tess-two,doo/tess-two,didldum/tess-two,Drakefrog/tess-two,Drakefrog/tess-two,wordsforthewise/tess-two,panzerfahrer/tess-two,lpalonek/tess-two,KrtinN/Scion,michyliao/tess-two,AlanFor301/tess-two,renard314/tess-two,garoxas/tess-two,CaveSven/TessTwo,AlanFor301/tess-two,JackFan-Z/tess-two,wordsforthewise/tess-two,lpalonek/tess-two,wordsforthewise/tess-two,Drakefrog/tess-two,rmtheis/tess-two,surensth/tess-two,yummy222/tess-two,Drakefrog/tess-two,michyliao/tess-two,yummy222/tess-two,surensth/tess-two,AlanFor301/tess-two,renard314/tess-two,KrtinN/Scion,panzerfahrer/tess-two,sirojnurulum/tess-two,Drakefrog/tess-two,rmtheis/tess-two,CaveSven/TessTwo,bhargavbhegde7/tess-two,sirojnurulum/tess-two,garoxas/tess-two,renard314/tess-two,AlanFor301/tess-two,doo/tess-two,JackFan-Z/tess-two,JackFan-Z/tess-two,garoxas/tess-two,KrtinN/Scion,KrtinN/Scion,michyliao/tess-two,rxl194/tess-two,panzerfahrer/tess-two,garoxas/tess-two,surensth/tess-two,panzerfahrer/tess-two,sirojnurulum/tess-two,rxl194/tess-two,demonquark/tess-two,lpalonek/tess-two,wordsforthewise/tess-two
a211855c2ec107eec845c54338c334c7d6dddc1e
src/signals.c
src/signals.c
/** * signal.c * * Copyright (C) 2017 Nickolas Burr <[email protected]> */ #include "signals.h" /** * Run cleanup on SIGHUP or SIGINT. */ void on_signal (int signal) { switch (signal) { case SIGHUP: printf("Caught SIGHUP, hanging up...\n"); break; case SIGINT: printf("Caught SIGINT, terminating...\n"); exit(EXIT_SUCCESS); default: fprintf(stderr, "Caught wrong signal: %d\n", signal); return; } } /** * Run tasks during awake period. */ void on_awake (int signal) { if (signal != SIGALRM) { fprintf(stderr, "Caught wrong signal: %d\n", signal); } } /** * Augmented sleep function for signal handling. */ void nap (int seconds) { struct sigaction action; sigset_t mask; action.sa_handler = &on_awake; action.sa_flags = SA_RESETHAND; sigfillset(&action.sa_mask); sigaction(SIGALRM, &action, NULL); sigprocmask(0, NULL, &mask); sigdelset(&mask, SIGALRM); alarm(seconds); sigsuspend(&mask); printf("nap: sigsuspend returned.\n"); }
/** * signal.c * * Copyright (C) 2017 Nickolas Burr <[email protected]> */ #include "signals.h" /** * Run cleanup on SIGHUP or SIGINT. */ void on_signal (int signal) { switch (signal) { case SIGHUP: printf("Caught SIGHUP, hanging up...\n"); break; case SIGINT: printf("Caught SIGINT, terminating...\n"); exit(EXIT_SUCCESS); default: fprintf(stderr, "Caught wrong signal: %d\n", signal); return; } } /** * Run tasks during awake period. */ void on_awake (int signal) { if (signal != SIGALRM) { fprintf(stderr, "Caught wrong signal: %d\n", signal); } /** * @todo: Finish building this. */ } /** * Augmented sleep function with signal handling. */ void nap (int seconds) { struct sigaction action; sigset_t mask; action.sa_handler = &on_awake; action.sa_flags = SA_RESETHAND; sigfillset(&action.sa_mask); sigaction(SIGALRM, &action, NULL); sigprocmask(0, NULL, &mask); sigdelset(&mask, SIGALRM); alarm(seconds); sigsuspend(&mask); }
Remove unused printf from nap
Remove unused printf from nap
C
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
2ae1f8b8b64c2f1397649686507dabf72f4b8667
common/alexcpt.h
common/alexcpt.h
#ifndef ALEXCPT_H #define ALEXCPT_H #include <exception> #include <string> #include "AL/alc.h" #ifdef __GNUC__ #define ALEXCPT_FORMAT(x, y, z) __attribute__((format(x, (y), (z)))) #else #define ALEXCPT_FORMAT(x, y, z) #endif namespace al { class backend_exception final : public std::exception { std::string mMessage; ALCenum mErrorCode; public: backend_exception(ALCenum code, const char *msg, ...) ALEXCPT_FORMAT(printf, 3,4); const char *what() const noexcept override { return mMessage.c_str(); } ALCenum errorCode() const noexcept { return mErrorCode; } }; } // namespace al #define START_API_FUNC try #ifndef _MSC_VER #define END_API_FUNC catch(...) { std::terminate(); } #else /* VS 2015 complains that some of these catch statements are unreachable code, * due to the function body not able to throw anything. While technically true, * it's preferable to mark API functions just in case that ever changes, so * silence that warning. */ #define END_API_FUNC __pragma(warning(push)) \ __pragma(warning(disable : 4702)) \ catch(...) { std::terminate(); } \ __pragma(warning(pop)) #endif #endif /* ALEXCPT_H */
#ifndef ALEXCPT_H #define ALEXCPT_H #include <exception> #include <string> #include "AL/alc.h" #ifdef __GNUC__ #define ALEXCPT_FORMAT(x, y, z) __attribute__((format(x, (y), (z)))) #else #define ALEXCPT_FORMAT(x, y, z) #endif namespace al { class backend_exception final : public std::exception { std::string mMessage; ALCenum mErrorCode; public: backend_exception(ALCenum code, const char *msg, ...) ALEXCPT_FORMAT(printf, 3,4); const char *what() const noexcept override { return mMessage.c_str(); } ALCenum errorCode() const noexcept { return mErrorCode; } }; } // namespace al #define START_API_FUNC try #define END_API_FUNC catch(...) { std::terminate(); } #endif /* ALEXCPT_H */
Revert "Silence some unreachable code warnings on MSVC"
Revert "Silence some unreachable code warnings on MSVC" This reverts commit 2ab4883439b1bc96578e86cc894504b9a1d1021b. It apparently didn't work at silencing anything.
C
lgpl-2.1
aaronmjacobs/openal-soft,aaronmjacobs/openal-soft
7faa28183f84df0fa245cab5b64447d05f71089b
A/01/09/task2.c
A/01/09/task2.c
#include <stdio.h> #include <string.h> #define MAX_WORDS 3000 #define STOPPER "vsmisal" struct occurance_t { long hash; unsigned int count; }; long hash(char*); int index_of(char*, struct occurance_t*, int); int main() { int i = 0, temp; char word[200]; struct occurance_t most_common = { 0, 0 }; struct occurance_t words[MAX_WORDS] = { { 0, 0 } }; while (1) { fgets(word, 201, stdin); if (strcmp(word, STOPPER) != 0 && i < MAX_WORDS) { if ((temp = index_of(word, words, i)) != -1) { words[temp].count++; } else { words[i].hash = hash(word); words[i].count = 1; i++; } } else { break; } } temp = 0; for (int j = 0; j < i; j++) { if (words[j].count > temp) { temp = words[j].count; most_common.hash = words[j].hash; most_common.count = words[j].count; } } printf("%d %ld", most_common.count, most_common.hash); return 0; } long hash(char *word) { long result = 42; int length = strlen(word); for (int i = 0; i < length; i++) { result += word[i] * (i + 1); } return result; } int index_of(char *word, struct occurance_t *words, int length) { for (int i = 0; i < length; i++) { if (hash(word) == words[i].hash) { return i; } } return -1; }
Add Task 02 for Homework 01
Add Task 02 for Homework 01
C
mit
elsys/po-homework
3ff88193bb6fc8cf84bb29499497f3fee73a124e
BoxSDK/BoxLog.h
BoxSDK/BoxLog.h
// // BoxLog.h // BoxSDK // // Created on 2/21/13. // Copyright (c) 2013 Box. All rights reserved. // #ifndef BoxSDK_BoxLog_h #define BoxSDK_BoxLog_h #ifdef DEBUG #define BOXLogFunction() NSLog(@"%s", __FUNCTION__) #define BOXLog(...) NSLog(@"%s: %@", __FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #else #define BOXLogFunction(...) #define BOXLog(...) #endif #ifdef DEBUG #define BOXAssert(x, ...) NSAssert(x, @"%s: %@", __FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #define BOXCAssert(...) NSCAssert(__VA_ARGS__) #define BOXAssert1(...) NSAssert1(__VA_ARGS__) #define BOXAssertFail(...) BOXAssert(NO, __VA_ARGS__) #define BOXAbstract() BOXAssertFail(@"Must be overridden by subclass.") #else #define BOXAssert(...) #define BOXCAssert(...) #define BOXAssert1(...) #define BOXAssertFail(...) #define BOXAbstract() #endif #endif
// // BoxLog.h // BoxSDK // // Created on 2/21/13. // Copyright (c) 2013 Box. All rights reserved. // #ifndef BoxSDK_BoxLog_h #define BoxSDK_BoxLog_h #ifdef DEBUG #define BOXLogFunction() NSLog(@"%s", __FUNCTION__) #define BOXLog(...) NSLog(@"%s: %@", __FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #else #define BOXLogFunction(...) #define BOXLog(...) #endif #ifdef DEBUG #define BOXAssert(x, ...) NSAssert(x, @"%s: %@", __FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) #define BOXCAssert(...) NSCAssert(__VA_ARGS__) #define BOXAssert1(...) NSAssert1(__VA_ARGS__) #define BOXAssertFail(...) BOXAssert(NO, __VA_ARGS__) #define BOXAbstract() BOXAssertFail(@"Must be overridden by subclass.") #else #define BOXAssert(...) #define BOXCAssert(...) #define BOXAssert1(...) #define BOXAssertFail(...) #define BOXAbstract() #endif #endif
Align macro definitions using spaces instead of tabs
Align macro definitions using spaces instead of tabs
C
apache-2.0
CleanShavenApps/box-ios-sdk-v2,CleanShavenApps/box-ios-sdk-v2,mirego/box-ios-sdk-v2,flatworld/box-ios-sdk-v2,mirego/box-ios-sdk-v2,DocuSignDev/box-ios-sdk-v2,Taptera/deprecated-box-ios-sdk,doo/box-ios-sdk-v2,CleanShavenApps/box-ios-sdk-v2,DocuSignDev/box-ios-sdk-v2,doo/box-ios-sdk-v2,Taptera/deprecated-box-ios-sdk,doo/box-ios-sdk-v2,doo/box-ios-sdk-v2,Taptera/deprecated-box-ios-sdk,flatworld/box-ios-sdk-v2,flatworld/box-ios-sdk-v2,DocuSignDev/box-ios-sdk-v2
d1a467438e03200735f80757a37c068b121d5610
src/main.c
src/main.c
/*! @file main.c @brief A simple test program for the C library code. */ #include "stdio.h" #include "verilog_parser.h" int main(int argc, char ** argv) { if(argc != 2) { printf("ERROR. Please supply exactly one file path argument.\n"); return 1; } else { // Load the file. FILE * fh = fopen(argv[1], "r"); // Instance the parser. verilog_parser parser = verilog_file_parse(fh); // Parse the file and store the result. int result = verilog_parse_buffer(parser); fclose(fh); if(result == 0) { printf("Parse successful\n"); return 0; } else { printf("Parse failed\n"); return 1; } } return 0; }
/*! @file main.c @brief A simple test program for the C library code. */ #include "stdio.h" #include "verilog_parser.h" int main(int argc, char ** argv) { if(argc < 2) { printf("ERROR. Please supply at least one file path argument.\n"); return 1; } else { int F = 0; for(F = 1; F < argc; F++) { // Load the file. FILE * fh = fopen(argv[F], "r"); // Instance the parser. verilog_parser parser = verilog_file_parse(fh); // Parse the file and store the result. int result = verilog_parse_buffer(parser); verilog_free_parser(parser); fclose(fh); if(result == 0) { printf("Parse successful for %s\n",argv[F]); } else { printf("Parse failed for %s\n",argv[F]); return 1; } } } return 0; }
Allow test app to recieve as many file inputs as possible. On branch master Your branch is up-to-date with 'github/master'.
Allow test app to recieve as many file inputs as possible. On branch master Your branch is up-to-date with 'github/master'. Changes to be committed: modified: ../src/main.c
C
mit
ben-marshall/verilog-parser,ben-marshall/verilog-parser,ben-marshall/verilog-parser
1f1fbe3c6bcb79b2222e91c230e9442bc9c88f5b
src/prot.h
src/prot.h
#ifndef HEADER_H_ #define HEADER_H_ #include <stdint.h> #include <stddef.h> // * Header * // // | 1 byte | // | 2 bytes ....... | // | 4 bytes ......................... | // // |--------|--------|--------|--------| // | Flags |Version |Padding | // |--------|--------|--------|--------| // | Frame size (incl header) | // |-----------------------------------| // | CRC32 | // |-----------------------------------| // End of header // |--------|--------|--------|--------| // | Payload | // | ... | // |--------|--------|--------|--------| struct header { uint16_t flags; uint8_t version; uint8_t pad; // not used uint32_t size; uint32_t crc32; }; #define HEADER_FLAGS_EMPTY 0x00 #define HEADER_FLAGS_READY 0xbeef // marks that the header and payload // is ready to be consumed #define HEADER_VERSION 0x0 #define HEADER_PAD 0x0 struct frame { const struct header* hdr; const unsigned char* buffer; }; void header_init(struct header*); size_t frame_payload_size(const struct frame*); #endif
#ifndef PROT_H_ #define PROT_H_ #include <stdint.h> #include <stddef.h> // * Header * // // | 1 byte | // | 2 bytes ....... | // | 4 bytes ......................... | // // |--------|--------|--------|--------| // | Flags |Version |Padding | // |--------|--------|--------|--------| // | Frame size (incl header) | // |-----------------------------------| // | CRC32 | // |-----------------------------------| // End of header // |--------|--------|--------|--------| // | Payload | // | ... | // |--------|--------|--------|--------| struct header { uint16_t flags; uint8_t version; uint8_t pad; // not used uint32_t size; uint32_t crc32; }; #define HEADER_FLAGS_EMPTY 0x00 #define HEADER_FLAGS_READY 0xbeef // marks that the header and payload // is ready to be consumed #define HEADER_VERSION 0x0 #define HEADER_PAD 0x0 struct frame { const struct header* hdr; const unsigned char* buffer; }; void header_init(struct header*); size_t frame_payload_size(const struct frame*); #endif
Rename HEADER_H_ marco -> PROT_H_
Rename HEADER_H_ marco -> PROT_H_ The header guard is not consistent with the filename.
C
bsd-3-clause
rbruggem/mqlog,rbruggem/mqlog
4202400f14c6bd4239834c1c3774333c403ab0e9
zephyr/shim/include/bbram.h
zephyr/shim/include/bbram.h
/* Copyright 2021 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef ZEPHYR_SHIM_INCLUDE_BBRAM_H_ #define ZEPHYR_SHIM_INCLUDE_BBRAM_H_ /** * Layout of the battery-backed RAM region. * TODO (b:178807203) Migrate these values to devicetree registers. */ enum bbram_data_index { /** General-purpose scratchpad */ BBRM_DATA_INDEX_SCRATCHPAD = 0, /** Saved reset flags */ BBRM_DATA_INDEX_SAVED_RESET_FLAGS = 4, /** Wake reasons for hibernate */ BBRM_DATA_INDEX_WAKE = 8, /** USB-PD saved port0 state */ BBRM_DATA_INDEX_PD0 = 12, /** USB-PD saved port1 state */ BBRM_DATA_INDEX_PD1 = 13, /** Vboot EC try slot */ BBRM_DATA_INDEX_TRY_SLOT = 14, /** USB-PD saved port2 state */ BBRM_DATA_INDEX_PD2 = 15, /** VbNvContext for ARM arch */ BBRM_DATA_INDEX_VBNVCNTXT = 16, /** RAM log for Booter */ BBRM_DATA_INDEX_RAMLOG = 32, /** Flag to indicate validity of panic data starting at index 36. */ BBRM_DATA_INDEX_PANIC_FLAGS = 35, /** Panic data (index 35-63)*/ BBRM_DATA_INDEX_PANIC_BKUP = 36, /** The start time of LCT(4 bytes) */ BBRM_DATA_INDEX_LCT_TIME = 64, }; #endif /* ZEPHYR_SHIM_INCLUDE_BBRAM_H_ */
Add battery-backed RAM constants for npcx
zephyr: Add battery-backed RAM constants for npcx Bring in the battery-backed RAM layout for npcx. This change includes a TODO to migrate these values to devicetree registers but since system.c is on the critical path, this will be a good step in the right direction. BRANCH=none BUG=b:176828988, b:174481378 TEST=zmake testall Signed-off-by: Yuval Peress <[email protected]> Change-Id: Ib84bf4f680c74a95a8549f57c30dab7fca3db42c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659681 Commit-Queue: Simon Glass <[email protected]> Reviewed-by: Simon Glass <[email protected]>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
67649d563f3811b4aa5b09a63029c753f8c4d632
include/Sprite.h
include/Sprite.h
#ifndef _SPRITE_H_ #define _SPRITE_H_ #include <memory> namespace canvas { class Texture; }; #include <glm/glm.hpp> class Sprite { public: Sprite(); virtual ~Sprite(); const std::shared_ptr<canvas::Texture> & getTexture() const { return texture; } void setTexture(const std::shared_ptr<canvas::Texture> & _texture) { texture = _texture; } const glm::vec2 & getPosition() const { return position; } float getWidth() const { return width; } float getHeight() const { return height; } void setPosition(const glm::vec2 & _position) { position = _position; } void setWidth(float _width) { width = _width; } void setHeight(float _height) { height = _height; } protected: glm::vec2 position; private: float width = 0, height = 0; std::shared_ptr<canvas::Texture> texture; }; #endif
#ifndef _SPRITE_H_ #define _SPRITE_H_ #include <memory> #include <Texture.h> #include <glm/glm.hpp> class Sprite { public: Sprite(); virtual ~Sprite(); const std::shared_ptr<Texture> & getTexture() const { return texture; } void setTexture(const std::shared_ptr<Texture> & _texture) { texture = _texture; } const glm::vec2 & getPosition() const { return position; } float getWidth() const { return width; } float getHeight() const { return height; } void setPosition(const glm::vec2 & _position) { position = _position; } void setWidth(float _width) { width = _width; } void setHeight(float _height) { height = _height; } protected: glm::vec2 position; private: float width = 0, height = 0; std::shared_ptr<Texture> texture; }; #endif
Change reference from removed canvas::texture
Change reference from removed canvas::texture
C
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
13059383a02834a8932b1f465755f44446ab6f95
include/itkTextProgressBarCommand.h
include/itkTextProgressBarCommand.h
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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 itkTextProgressBarCommand_h #define itkTextProgressBarCommand_h #include "itkCommand.h" #include <string> namespace itk { /** \class TextProgressBarCommand * * \brief A simple command that outputs a text progress bar the associated filter. * * \ingroup Ultrasound * */ class TextProgressBarCommand: public Command { public: typedef TextProgressBarCommand Self; typedef Command Superclass; typedef SmartPointer< Self > Pointer; itkNewMacro( Self ); protected: TextProgressBarCommand(); void Execute(itk::Object *caller, const itk::EventObject & event) override; void Execute(const itk::Object * object, const itk::EventObject & event) override; std::string m_Progress; }; } // end namespace itk #endif
/*========================================================================= * * Copyright Insight Software Consortium * * 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.txt * * 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 itkTextProgressBarCommand_h #define itkTextProgressBarCommand_h #include "itkCommand.h" #include "UltrasoundExport.h" #include <string> namespace itk { /** \class TextProgressBarCommand * * \brief A simple command that outputs a text progress bar the associated filter. * * \ingroup Ultrasound * */ class Ultrasound_EXPORT TextProgressBarCommand: public Command { public: typedef TextProgressBarCommand Self; typedef Command Superclass; typedef SmartPointer< Self > Pointer; itkNewMacro( Self ); protected: TextProgressBarCommand(); void Execute(itk::Object *caller, const itk::EventObject & event) override; void Execute(const itk::Object * object, const itk::EventObject & event) override; std::string m_Progress; }; } // end namespace itk #endif
Add missing export specification for TextProgressBarCommand
COMP: Add missing export specification for TextProgressBarCommand
C
apache-2.0
thewtex/ITKUltrasound,thewtex/ITKUltrasound,KitwareMedical/ITKUltrasound,thewtex/ITKUltrasound,KitwareMedical/ITKUltrasound,KitwareMedical/ITKUltrasound
0c7983f5b6c3c2b33bdbc5cea4e1bf9a18a86ce2
src/Watermark/View/WatermarkDataRepository.h
src/Watermark/View/WatermarkDataRepository.h
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved #pragma once #include "IWatermarkDataRepository.h" #include "Watermark.h" #include <map> #include <string> namespace ExampleApp { namespace Watermark { namespace View { class WatermarkDataRepository : public IWatermarkDataRepository { public: void AddWatermarkData(const std::string& key, const WatermarkData& watermarkData); void RemoveWatermarkDataWithKey(const std::string& key); bool HasWatermarkDataForKey(const std::string& key) const; WatermarkData GetWatermarkDataWithKey(const std::string& key) const; private: typedef std::map<std::string, WatermarkData> TWatermarkDataMap; TWatermarkDataMap m_watermarkDataMap; }; } } }
// Copyright eeGeo Ltd (2012-2015), All Rights Reserved #pragma once #include "IWatermarkDataRepository.h" #include "Watermark.h" #include <map> #include <string> namespace ExampleApp { namespace Watermark { namespace View { class WatermarkDataRepository : public IWatermarkDataRepository { public: void AddWatermarkData(const std::string& key, const WatermarkData& watermarkData); void RemoveWatermarkDataWithKey(const std::string& key); bool HasWatermarkDataForKey(const std::string& key) const; WatermarkData GetWatermarkDataWithKey(const std::string& key) const; private: struct CaseInsensitiveCompare { bool operator()(const std::string& l, const std::string& r) const { return std::lexicographical_compare(l.begin(), l.end(), r.begin(), r.end(), [](const char c1, const char c2) { return std::tolower(c1) < std::tolower(c2); }); } }; typedef std::map<std::string, WatermarkData, CaseInsensitiveCompare> TWatermarkDataMap; TWatermarkDataMap m_watermarkDataMap; }; } } }
Fix MPLY-8362: check watermark building id case insensitively.
Fix MPLY-8362: check watermark building id case insensitively.
C
bsd-2-clause
eegeo/eegeo-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app,wrld3d/wrld-example-app,eegeo/eegeo-example-app
387a235ba330d8e5b3ccd64406dc7539405f0f86
server/src/apache/analyzer/detail/session_length.h
server/src/apache/analyzer/detail/session_length.h
/* * Copyright 2016 Adam Chyła, [email protected] * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H #define SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H namespace apache { namespace analyzer { namespace detail { constexpr int SESSION_LENGTH = 3600; } } } #endif /* SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H */
/* * Copyright 2016 Adam Chyła, [email protected] * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H #define SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H namespace apache { namespace analyzer { namespace detail { constexpr int SESSION_LENGTH = 3 * 60; } } } #endif /* SRC_APACHE_ANALYZER_DETAIL_SESSION_LENGTH_H */
Change session length to 3 minutes
Change session length to 3 minutes
C
mit
chyla/slas,chyla/slas,chyla/pat-lms,chyla/slas,chyla/slas,chyla/slas,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/pat-lms,chyla/slas,chyla/slas
e22b43421274a5ba38025d2f458b9adaf8389d11
src/methods.h
src/methods.h
char *get_id(void)
#ifndef AINOD_METHODS_H #define AINOD_METHODS_H /** Invalid JSON was received by the server. **/ #define JSON_SCHEMA_ERROR_PARSE_ERROR -32700 /** The JSON sent is not a valid Request object. */ #define JSON_SCHEMA_ERROR_INVALID_REQUEST -32600 /** The method does not exist / is not available. **/ #define JSON_SCHEMA_ERROR_METHOD_NOT_FOUND -32601 /** Invalid method parameter(s). */ #define JSON_SCHEMA_ERROR_INVALID_PARAMS -32602 /** Internal JSON-RPC error. */ #define JSON_SCHEMA_ERROR_INTERNAL_ERROR -32603 /** Reserved for implementation-defined server-errors. */ #define JSON_SCHEMA_ERROR_SERVER_ERROR -32000 char *get_id(void); int process_buffer(char *buf); #endif /* AINOD_METHODS_H */
Add Json schema error parse errors.
Add Json schema error parse errors.
C
lgpl-2.1
zeth/ainod,zeth/ainod,zeth/ainod
562733680af382869d661ea15981a894f006da76
Engine/RXArchiveManager.h
Engine/RXArchiveManager.h
// // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
// // RXArchiveManager.h // rivenx // // Created by Jean-Francois Roy on 02/02/2008. // Copyright 2005-2010 MacStorm. All rights reserved. // #import "Base/RXBase.h" #import <MHKKit/MHKKit.h> @interface RXArchiveManager : NSObject { NSString* patches_directory; MHKArchive* extras_archive; } + (RXArchiveManager*)sharedArchiveManager; + (NSPredicate*)anyArchiveFilenamePredicate; + (NSPredicate*)dataArchiveFilenamePredicate; + (NSPredicate*)soundsArchiveFilenamePredicate; + (NSPredicate*)extrasArchiveFilenamePredicate; // NOTE: these methods return the archives sorted in the order they should be searched; code should always forward-iterate the returned array - (NSArray*)dataArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (NSArray*)soundArchivesForStackKey:(NSString*)stack_key error:(NSError**)error; - (MHKArchive*)extrasArchive:(NSError**)error; @end
Add note about the order of archives returned by the archive manager.
Add note about the order of archives returned by the archive manager.
C
bsd-3-clause
jfroy/rivenx,jfroy/rivenx,jfroy/rivenx,jfroy/rivenx
7cd47486ac530cc991248d59d04260c0d297b05d
HTMLKit/CSSTypeSelector.h
HTMLKit/CSSTypeSelector.h
// // CSSTypeSelector.h // HTMLKit // // Created by Iska on 13/05/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> #import "CSSSelector.h" #import "CSSSimpleSelector.h" @interface CSSTypeSelector : CSSSelector <CSSSimpleSelector> @property (nonatomic, copy) NSString *type; + (instancetype)universalSelector; - (instancetype)initWithType:(NSString *)type; @end
// // CSSTypeSelector.h // HTMLKit // // Created by Iska on 13/05/15. // Copyright (c) 2015 BrainCookie. All rights reserved. // #import <Foundation/Foundation.h> #import "CSSSelector.h" #import "CSSSimpleSelector.h" @interface CSSTypeSelector : CSSSelector <CSSSimpleSelector> @property (nonatomic, copy) NSString * _Nonnull type; + (nullable instancetype)universalSelector; - (nullable instancetype)initWithType:(nonnull NSString *)type; @end
Add nullability specifiers to type selector
Add nullability specifiers to type selector
C
mit
iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit
59be11a20543d3d19d00ac9f57e703e98475852a
Animation.h
Animation.h
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(const Blittable& b); void remove(const Blittable& b); void removeAll(); virtual void animate() = 0; protected: std::vector<Blittable*> targets; } } #endif
#ifndef ANIMATION_H #define ANIMATION_H #include <vector> #include "Blittable.h" #include "Logger.h" namespace hm { class Animation { public: Animation(); ~Animation(); void add(Blittable& b); void remove(Blittable& b); void removeAll(); virtual void animate() = 0; protected: std::vector<Blittable*> targets; }; } #endif
Fix a couple of header issues.
Fix a couple of header issues.
C
lgpl-2.1
mdclyburn/hume
dbfcaec50408d9b12ffb459011f9af1c7304ec84
flash_writer.h
flash_writer.h
#ifndef FLASH_WRITER_H #define FLASH_WRITER_H #include <stdint.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif /** Unlocks the flash for programming. */ void flash_writer_unlock(void); /** Locks the flash */ void flash_writer_lock(void); /** Erases the flash page at given address. */ void flash_writer_page_erase(void *page); /** Writes data to given location in flash. */ void flash_writer_page_write(void *page, uint8_t *data, size_t len); #ifdef __cplusplus } #endif #endif /* FLASH_WRITER_H */
#ifndef FLASH_WRITER_H #define FLASH_WRITER_H #include <stdint.h> #include <stddef.h> #ifdef __cplusplus extern "C" { #endif /** Unlocks the flash for programming. */ void flash_writer_unlock(void); /** Locks the flash */ void flash_writer_lock(void); /** Erases the flash page at given address. */ void flash_writer_page_erase(void *page); /** Writes data to given location in flash. */ void flash_writer_page_write(void *page, void *data, size_t len); #ifdef __cplusplus } #endif #endif /* FLASH_WRITER_H */
Convert data source adress type to void *
Convert data source adress type to void * This should be the standard, as done for example in memcpy(3).
C
bsd-2-clause
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
4571ac8b500390e3b70370369386d9cec35ea536
riegeli/base/errno_mapping.h
riegeli/base/errno_mapping.h
// Copyright 2018 Google LLC // // 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 RIEGELI_BASE_STR_ERROR_H_ #define RIEGELI_BASE_STR_ERROR_H_ #include "absl/strings/string_view.h" #include "riegeli/base/status.h" namespace riegeli { // Converts errno value to Status. Status ErrnoToCanonicalStatus(int error_number, absl::string_view message); } // namespace riegeli #endif // RIEGELI_BASE_STR_ERROR_H_
// Copyright 2018 Google LLC // // 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 RIEGELI_BASE_ERRNO_MAPPING_H_ #define RIEGELI_BASE_ERRNO_MAPPING_H_ #include "absl/strings/string_view.h" #include "riegeli/base/status.h" namespace riegeli { // Converts errno value to Status. Status ErrnoToCanonicalStatus(int error_number, absl::string_view message); } // namespace riegeli #endif // RIEGELI_BASE_ERRNO_MAPPING_H_
Fix include guard to match the current filename.
Fix include guard to match the current filename. PiperOrigin-RevId: 256006893
C
apache-2.0
google/riegeli,google/riegeli,google/riegeli,google/riegeli
fbfc30dffdc5f4a5e9d04f070dcbe8344f3a1c94
tests/chardata.h
tests/chardata.h
/* chardata.h * * */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
/* chardata.h Interface to some helper routines used to accumulate and check text and attribute content. */ #ifndef XML_CHARDATA_H #define XML_CHARDATA_H 1 #ifndef XML_VERSION #include "expat.h" /* need XML_Char */ #endif typedef struct { int count; /* # of chars, < 0 if not set */ XML_Char data[1024]; } CharData; void CharData_Init(CharData *storage); void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); int CharData_CheckString(CharData *storage, const char *s); int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */
Add a small comment to tell what this is.
Add a small comment to tell what this is.
C
mit
PKRoma/expat,PKRoma/expat,PKRoma/expat,PKRoma/expat
4a1156e7ed3598903fd6643535259a1d92df2736
sw/device/lib/dif/dif_edn.c
sw/device/lib/dif/dif_edn.c
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "sw/device/lib/dif/dif_edn.h" #include "edn_regs.h" // Generated
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "sw/device/lib/dif/dif_edn.h" #include "edn_regs.h" // Generated dif_result_t dif_edn_init(mmio_region_t base_addr, dif_edn_t *edn) { if (edn == NULL) { return kDifBadArg; } edn->base_addr = base_addr; return kDifOk; }
Add init DIF for EDN
[sw/dif/edn] Add init DIF for EDN This enables EDN irqs to be tested with the automated irq test. Signed-off-by: Srikrishna Iyer <[email protected]>
C
apache-2.0
lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan
8dc392689d59ecdbca61cfae23c065279e731db8
test/test_parser_optional.c
test/test_parser_optional.c
#include "test_parser_p.h" void optional_some(void **state) { grammar_t *grammar = grammar_init( non_terminal("Option"), rule_init( "Option", optional( terminal("opt") ) ), 1 ); parse_t *result = parse("opt", grammar); assert_non_null(result); assert_int_equal(result->length, 3); assert_int_equal(result->n_children, 1); } void optional_none(void **state) { grammar_t *grammar = grammar_init( non_terminal("Option"), rule_init( "Option", optional( terminal("opt") ) ), 1 ); parse_t *result = parse("nope", grammar); assert_non_null(result); assert_int_equal(result->length, 0); assert_int_equal(result->n_children, 0); }
#include "test_parser_p.h" void optional_some(void **state) { grammar_t *grammar = grammar_init( non_terminal("Option"), rule_init( "Option", optional( terminal("opt") ) ), 1 ); parse_result_t *result = parse("opt", grammar); assert_non_null(result); assert_true(is_success(result)); parse_t *suc = result->data.result; assert_int_equal(suc->length, 3); assert_int_equal(suc->n_children, 1); } void optional_none(void **state) { grammar_t *grammar = grammar_init( non_terminal("Option"), rule_init( "Option", optional( terminal("opt") ) ), 1 ); parse_result_t *result = parse("nope", grammar); assert_non_null(result); assert_true(is_success(result)); parse_t *suc = result->data.result; assert_int_equal(suc->length, 0); assert_int_equal(suc->n_children, 0); }
Use new API in optional tests
Use new API in optional tests
C
mit
Baltoli/peggo,Baltoli/peggo
b92ab7b2546d69c8ea887c21a148bad82370b47a
test/profile/Inputs/instrprof-merge-match-lib.c
test/profile/Inputs/instrprof-merge-match-lib.c
#include <stdint.h> #include <stdio.h> #include <stdlib.h> int __llvm_profile_runtime = 0; uint64_t __llvm_profile_get_size_for_buffer(void); int __llvm_profile_write_buffer(char *); void __llvm_profile_reset_counters(void); int __llvm_profile_check_compatibility(const char *, uint64_t); int gg = 0; void bar(char c) { if (c == '1') gg++; else gg--; } /* Returns 0 (size) when an error occurs. */ uint64_t libEntry(char *Buffer, uint64_t MaxSize) { uint64_t Size = __llvm_profile_get_size_for_buffer(); if (Size > MaxSize) return 1; __llvm_profile_reset_counters(); bar('1'); if (__llvm_profile_write_buffer(Buffer)) return 0; /* Now check compatibility. Should return 0. */ if (__llvm_profile_check_compatibility(Buffer, Size)) return 0; return Size; }
#include <stdint.h> #include <stdio.h> #include <stdlib.h> int __llvm_profile_runtime = 0; uint64_t __llvm_profile_get_size_for_buffer(void); int __llvm_profile_write_buffer(char *); void __llvm_profile_reset_counters(void); int __llvm_profile_check_compatibility(const char *, uint64_t); int gg = 0; void bar(char c) { if (c == '1') gg++; else gg--; } /* Returns 0 (size) when an error occurs. */ uint64_t libEntry(char *Buffer, uint64_t MaxSize) { uint64_t Size = __llvm_profile_get_size_for_buffer(); if (Size > MaxSize) return 0; __llvm_profile_reset_counters(); bar('1'); if (__llvm_profile_write_buffer(Buffer)) return 0; /* Now check compatibility. Should return 0. */ if (__llvm_profile_check_compatibility(Buffer, Size)) return 0; return Size; }
Fix a minor bug in test
Fix a minor bug in test git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@263028 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
ca419f6d8ae07ef1b83834f9d5d726fed74c2a44
bgc/DIC_ATMOS.h
bgc/DIC_ATMOS.h
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $ C $Name: $ COMMON /INTERACT_ATMOS_NEEDS/ & co2atmos, & total_atmos_carbon, total_ocean_carbon, & total_atmos_carbon_year, & total_ocean_carbon_year, & total_atmos_carbon_start, & total_ocean_carbon_start, & atpco2 _RL co2atmos(1000) _RL total_atmos_carbon _RL total_ocean_carbon _RL total_atmos_carbon_year _RL total_atmos_carbon_start _RL total_ocean_carbon_year _RL total_ocean_carbon_start _RL atpco2
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $ C $Name: $ COMMON /INTERACT_ATMOS_NEEDS/ & co2atmos, & total_atmos_carbon, total_ocean_carbon, & total_atmos_carbon_year, & total_ocean_carbon_year, & total_atmos_carbon_start, & total_ocean_carbon_start, & atpco2,total_atmos_moles _RL co2atmos(1000) _RL total_atmos_carbon _RL total_ocean_carbon _RL total_atmos_carbon_year _RL total_atmos_carbon_start _RL total_ocean_carbon_year _RL total_ocean_carbon_start _RL atpco2 _RL total_atmos_moles
Add ability to specify CO2 emissions (dic_int1=4)
Add ability to specify CO2 emissions (dic_int1=4)
C
mit
seamanticscience/mitgcm_mods,seamanticscience/mitgcm_mods
36c74125fadf0c57ab44933fbe053a54af64bcff
tests/simple/test-wrapped.c
tests/simple/test-wrapped.c
// RUN: %crabllvm -O0 --crab-dom=w-int --crab-check=assert "%s" 2>&1 | OutputCheck %s // CHECK: ^1 Number of total safe checks$ // CHECK: ^0 Number of total error checks$ // CHECK: ^0 Number of total warning checks$ extern int nd(void); extern void process(char); extern void __CRAB_assert(int); int main() { char x,y; y=-10; if(nd()) x=0; else x=100; while (x >= y){ x = x-y; } __CRAB_assert(x >= -128 && x <= -119); return 0; }
Add a test for the wrapped interval domain
Add a test for the wrapped interval domain
C
apache-2.0
seahorn/crab-llvm,seahorn/crab-llvm,seahorn/crab-llvm
45f929a417328c3dc5703ca6b7827eacc655c807
tests/test_mix/source/computer_listener_mock.h
tests/test_mix/source/computer_listener_mock.h
#pragma once #include <mix/computer_listener.h> #include <gmock/gmock.h> struct ComputerListenerMock : public mix::IComputerListener { MOCK_METHOD1(on_memory_set, void (int)); MOCK_METHOD0(on_ra_set, void ()); MOCK_METHOD0(on_rx_set, void ()); MOCK_METHOD1(on_ri_set, void (std::size_t)); MOCK_METHOD0(on_overflow_flag_set, void ()); };
#pragma once #include <mix/computer_listener.h> #include <gmock/gmock.h> struct ComputerListenerMock : public mix::IComputerListener { MOCK_METHOD1(on_memory_set, void (int)); MOCK_METHOD0(on_ra_set, void ()); MOCK_METHOD0(on_rx_set, void ()); MOCK_METHOD1(on_ri_set, void (std::size_t)); MOCK_METHOD0(on_overflow_flag_set, void ()); MOCK_METHOD0(on_comparison_state_set, void ()); };
Add missed on_comparison_state_set() function to ComputerListenerMock
Add missed on_comparison_state_set() function to ComputerListenerMock
C
mit
grishavanika/mix,grishavanika/mix,grishavanika/mix
78d215b76d0eddc622f5dd1a4c26f3637bc3ab07
include/llvm/Bytecode/Writer.h
include/llvm/Bytecode/Writer.h
//===-- llvm/Bytecode/Writer.h - Writer for VM bytecode files ---*- 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. // //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/BytecodeWriter library. // This library is used to write VM bytecode files to an iostream. First, you // have to make a BytecodeStream object, which you can then put a class into // by using operator <<. // // This library uses the Analysis library to figure out offsets for // variables in the method tables... // // Note that performance of this library is not as crucial as performance of the // bytecode reader (which is to be used in JIT type applications), so we have // designed the bytecode format to support quick reading. // //===----------------------------------------------------------------------===// #ifndef LLVM_BYTECODE_WRITER_H #define LLVM_BYTECODE_WRITER_H #include <iosfwd> namespace llvm { class Module; void WriteBytecodeToFile(const Module *M, std::ostream &Out, bool compress = false); } // End llvm namespace #endif
//===-- llvm/Bytecode/Writer.h - Writer for VM bytecode files ---*- 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. // //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/BytecodeWriter library. // This library is used to write VM bytecode files to an iostream. First, you // have to make a BytecodeStream object, which you can then put a class into // by using operator <<. // // This library uses the Analysis library to figure out offsets for // variables in the method tables... // // Note that performance of this library is not as crucial as performance of the // bytecode reader (which is to be used in JIT type applications), so we have // designed the bytecode format to support quick reading. // //===----------------------------------------------------------------------===// #ifndef LLVM_BYTECODE_WRITER_H #define LLVM_BYTECODE_WRITER_H #include <iosfwd> namespace llvm { class Module; void WriteBytecodeToFile(const Module *M, std::ostream &Out, bool compress = true); } // End llvm namespace #endif
Make compression the default on writing.
Make compression the default on writing. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@17577 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm
cb832699e29447fe66594fb122a1bdddd3539c42
src/augs/readwrite/lua_readwrite_declaration.h
src/augs/readwrite/lua_readwrite_declaration.h
#pragma once #include "3rdparty/sol2/sol/forward.hpp" namespace augs { template <class Archive, class Serialized> void write_lua(Archive&, const Serialized& from); template <class Archive, class Serialized> void read_lua(const Archive&, Serialized& into); template <class Archive, class Serialized> void write_lua_no_overload(Archive&, const Serialized& from); template <class Archive, class Serialized> void read_lua_no_overload(const Archive&, Serialized& into); template <class T, class K> void write_table_or_field(sol::table& output_table, const T& from, K&& key); template <class T> void general_from_lua_value(const sol::object& object, T& into); }
#pragma once #include <sol/forward.hpp> namespace augs { template <class Archive, class Serialized> void write_lua(Archive&, const Serialized& from); template <class Archive, class Serialized> void read_lua(const Archive&, Serialized& into); template <class Archive, class Serialized> void write_lua_no_overload(Archive&, const Serialized& from); template <class Archive, class Serialized> void read_lua_no_overload(const Archive&, Serialized& into); template <class T, class K> void write_table_or_field(sol::table& output_table, const T& from, K&& key); template <class T> void general_from_lua_value(const sol::object& object, T& into); }
Fix another broken sol include
Fix another broken sol include
C
agpl-3.0
TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Hypersomnia,TeamHypersomnia/Augmentations
1f38f2566e6a8b2c7399af25da44104cbc55cdbb
unlock/legacy/device-wrappers/pymotiv/pymotiv.h
unlock/legacy/device-wrappers/pymotiv/pymotiv.h
#ifndef PYPOC_H #define PYPOC_H #include <Windows.h> #include "EmoStateDLL.h" #include "edk.h" #include "edkErrorCode.h" class EPOC { private: EmoEngineEventHandle eEvent; EmoStateHandle eState; DataHandle hData; int nChannels; EE_DataChannel_t *channels; unsigned int userId; double *samples; BOOL ready; BOOL closed; public: EPOC(); ~EPOC(); BOOL open(); BOOL init(const int); BOOL start(); BOOL acquire(); void getdata(int *data, int n); BOOL stop(); BOOL close(); }; #endif
#ifndef PYPOC_H #define PYPOC_H #include <Windows.h> #include "EmoStateDLL.hpp" #include "edk.hpp" #include "edkErrorCode.hpp" class EPOC { private: EmoEngineEventHandle eEvent; EmoStateHandle eState; DataHandle hData; int nChannels; EE_DataChannel_t *channels; unsigned int userId; double *samples; BOOL ready; BOOL closed; public: EPOC(); ~EPOC(); BOOL open(); BOOL init(const int); BOOL start(); BOOL acquire(); void getdata(int *data, int n); BOOL stop(); BOOL close(); }; #endif
Make legacy header reference old code.
Make legacy header reference old code.
C
bsd-3-clause
NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock
f74dc6b045f695c013a4bd49df7411691d5c86f7
cvrp/customer.h
cvrp/customer.h
#ifndef VRPSOLVER_CUSTOMER_H #define VRPSOLVER_CUSTOMER_H namespace VrpSolver { class Customer { public: Customer(unsigned int id, unsigned int demand) : id_(id), demand_(demand) {} unsigned int id() const { return id_; } unsigned int demand() const { return demand_; } private: Customer(); unsigned int id_; unsigned int demand_; }; } // namespace VrpSolver #endif // VRPSOLVER_CUSTOMER_H
#ifndef VRPSOLVER_CUSTOMER_H #define VRPSOLVER_CUSTOMER_H namespace VrpSolver { class Customer { public: Customer(unsigned int id, std::size_t demand) : id_(id), demand_(demand) {} unsigned int id() const { return id_; } std::size_t demand() const { return demand_; } private: Customer(); unsigned int id_; std::size_t demand_; }; } // namespace VrpSolver #endif // VRPSOLVER_CUSTOMER_H
Change the type of Customer::demand to std::size_t
Change the type of Customer::demand to std::size_t
C
mit
U-MA/cvrp,U-MA/cvrp
ade98d9f3a27765d33b2464a3ab76ba36217834b
dependencies/stdafx/stdafx.h
dependencies/stdafx/stdafx.h
#include <Ogre.h> #include <OgreMeshFileFormat.h> #include <OgreOptimisedUtil.h> #ifdef WIN32 #include <OgreD3D9RenderSystem.h> #include <OgreD3D9HLSLProgram.h> #endif #include <OgreGLRenderSystem.h> #include <OgreGLGpuProgram.h> #include <OgreGLSLGpuProgram.h> #include <OgreGLSLLinkProgramManager.h> #include <OgreGLSLProgram.h> #include <OgreOctreePlugin.h> #include <OgreOctreeSceneManager.h> #include <OgreCgPlugin.h> #include <OgreCgProgram.h>
#include <Ogre.h> #include <OgreMeshFileFormat.h> #include <OgreOptimisedUtil.h> #include <OgrePredefinedControllers.h> #ifdef WIN32 #include <OgreD3D9RenderSystem.h> #include <OgreD3D9HLSLProgram.h> #endif #include <OgreGLRenderSystem.h> #include <OgreGLGpuProgram.h> #include <OgreGLSLGpuProgram.h> #include <OgreGLSLLinkProgramManager.h> #include <OgreGLSLProgram.h> #include <OgreOctreePlugin.h> #include <OgreOctreeSceneManager.h> #include <OgreCgPlugin.h> #include <OgreCgProgram.h>
Add header for FrameController to pch
Add header for FrameController to pch
C
mit
sparkprime/grit-engine,grit-engine/grit-engine,grit-engine/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,sparkprime/grit-engine,grit-engine/grit-engine,grit-engine/grit-engine
3918e7b3451b9fdadfbf1f40e5df6e60dcfa3abf
cat.c
cat.c
#include <sys/types.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> /* a re-implementation of cat(1), to learn the basic Unix syscalls. by tlehman at 1383415046 */ void usage(const char *progname) { printf("%s filename\n", progname); exit(EXIT_FAILURE); } void print_file_contents(const char *filename) { int fd; ssize_t b; char buf[BUFSIZ]; fd = open(filename, O_RDONLY); while ( (b = read(fd, buf, BUFSIZ)) != 0 ) { write(STDOUT_FILENO, buf, b); } close(fd); } int main(int argc, char const *argv[]) { int i; if (argc > 1) { for(i = 1; i < argc; i++) { print_file_contents(argv[i]); } } else { usage(argv[0]); } return 0; }
#include <sys/types.h> #include <sys/select.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <fcntl.h> /* a re-implementation of cat(1), to learn the basic Unix syscalls. by tlehman at 1383415046 */ void usage(const char *progname) { printf("%s filename\n", progname); exit(EXIT_FAILURE); } void print_file_contents(int fd) { ssize_t b; char buf[BUFSIZ]; while ( (b = read(fd, buf, BUFSIZ)) != 0 ) { write(STDOUT_FILENO, buf, b); } } int stdin_non_empty() { fd_set fds; FD_SET(STDIN_FILENO, &fds); return select(1, &fds, NULL, NULL, NULL); } int main(int argc, char const *argv[]) { int i; int fd; if (argc > 1) { for(i = 1; i < argc; i++) { fd = open(argv[i], O_RDONLY); print_file_contents(fd); close(fd); } } else if (stdin_non_empty()) { print_file_contents(STDIN_FILENO); } else { usage(argv[0]); } return 0; }
Read from STDIN when no filename is given
Read from STDIN when no filename is given
C
unlicense
tlehman/unix_utils
3c6ffceade64f6eda28642cfcd61019a03938572
chrome/browser/spellchecker/word_trimmer.h
chrome/browser/spellchecker/word_trimmer.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 CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_H_ #define CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_H_ #include "base/i18n/base_i18n_export.h" #include "base/string16.h" // Trims |text| to contain only the range from |start| to |end| and |keep| words // on either side of the range. The |start| and |end| parameters are character // indexes into |text|. The |keep| parameter is the number of words to keep on // either side of the |start|-|end| range. The function updates |start| in // accordance with the trimming. // // Example: // // size_t start = 14; // size_t end = 23; // string16 text = ASCIIToUTF16("one two three four five six seven eight"); // int keep = 2; // string16 trimmed = TrimWords(&start, end, text, keep); // DCHECK(trimmed == ASCIIToUTF16("two three four five six seven")); // DCHECK(start == 10); // string16 TrimWords( size_t* start, size_t end, const string16& text, size_t keep); #endif // CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_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 CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_H_ #define CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_H_ #include "base/string16.h" // Trims |text| to contain only the range from |start| to |end| and |keep| words // on either side of the range. The |start| and |end| parameters are character // indexes into |text|. The |keep| parameter is the number of words to keep on // either side of the |start|-|end| range. The function updates |start| in // accordance with the trimming. // // Example: // // size_t start = 14; // size_t end = 23; // string16 text = ASCIIToUTF16("one two three four five six seven eight"); // int keep = 2; // string16 trimmed = TrimWords(&start, end, text, keep); // DCHECK(trimmed == ASCIIToUTF16("two three four five six seven")); // DCHECK(start == 10); // string16 TrimWords( size_t* start, size_t end, const string16& text, size_t keep); #endif // CHROME_BROWSER_SPELLCHECKER_WORD_TRIMMER_H_
Remove unnecessary include in spellcheck word trimmer
Remove unnecessary include in spellcheck word trimmer TBR=groby BUG=170514 Review URL: https://chromiumcodereview.appspot.com/14273022 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@196650 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
M4sse/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,Just-D/chromium-1,jaruba/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,Chilledheart/chromium,patrickm/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,M4sse/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,dednal/chromium.src,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,anirudhSK/chromium,hujiajie/pa-chromium,dednal/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,markYoungH/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,littlstar/chromium.src,anirudhSK/chromium,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Chilledheart/chromium,ltilve/chromium,axinging/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,patrickm/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,markYoungH/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,patrickm/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,anirudhSK/chromium,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ltilve/chromium,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,ondra-novak/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,ltilve/chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl
eafcde2103a2bfe27304664f331b10265d8e7bca
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k19"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k20"
Update driver version to 5.02.00-k20
[SCSI] qla4xxx: Update driver version to 5.02.00-k20 Signed-off-by: Vikas Chaudhary <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
b8af68049f97718e1ecd5e86aa1bf5c7cafa8be0
Trie.c
Trie.c
//Trie data structure testing //All code written my Nathaniel Thompson #include <stdio.h> #include <stdlib.h> //trie structure typedef struct _trie { char letter; //the letter that the node holds _trie *next[26];//pointers to the rest of the letters }trie; //main function int main(void) { }
//Trie data structure testing //All code written my Nathaniel Thompson #include <stdio.h> #include <stdlib.h> //trie structure typedef struct _trie{ char letter; //the letter that the node holds struct _trie *next[26];//pointers to the rest of the letters }trie; //fucntion prototypes void initialize(trie *); //main function int main(void) { int i=0; trie *root=malloc(sizeof(trie)); //this is the root of the tree root->letter=0;//it doesn't contain a letter initialize(root); for(i=0;i<26;i++) { printf("%c",root->next[i]->letter); } } void initialize(trie *root) { int i; int j; for(i=0;i<26;i++) //initialize all of the letters { root->next[i]=malloc(sizeof(trie)); // get memory for each letter root->next[i]->letter='a'+i; //give the letters the proper values for(j=0;j<26;j++) root->next[i]->next[j]=NULL; //Set all the letters pointers to null } printf("good fucntion call\n"); }
Structure was properly set up, TODO Create a small dictionary load dictionary into the trie
Structure was properly set up, TODO Create a small dictionary load dictionary into the trie
C
mit
Felttrip/TrieWords
a4cb50ac023800ecb1442ce5269effcf7e012f8a
test2/__attribute__/parsing_decl_struct_post.c
test2/__attribute__/parsing_decl_struct_post.c
// RUN: %ucc -fsyntax-only %s struct A { char i, j; } __attribute((aligned(8))); struct A a; _Static_assert(_Alignof(a) == 8, "misaligned/attr not picked up");
Test parsing __attribute__ after a struct definition
Test parsing __attribute__ after a struct definition
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
e3d436ba7ba128aaebb480aeb07f1a013e8e75f1
tests/headers/dupe-enum-variant-in-namespace.h
tests/headers/dupe-enum-variant-in-namespace.h
// bindgen-flags: --rustified-enum ".*" --enable-cxx-namespaces -- -x c++ namespace foo { enum class Bar : unsigned { Foo = 0, Foo1 = 0, Foo2, Foo3 = Foo2, }; }
// bindgen-flags: --rustified-enum ".*" --enable-cxx-namespaces -- -x c++ -std=c++11 namespace foo { enum class Bar : unsigned { Foo = 0, Foo1 = 0, Foo2, Foo3 = Foo2, }; }
Fix a pre-existing failing test?
Fix a pre-existing failing test?
C
bsd-3-clause
rust-lang/rust-bindgen,rust-lang/rust-bindgen,rust-lang/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen,rust-lang/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen,emilio/rust-bindgen
93a0f6dbddc577afc67be7de7ac258907f405e7d
src/jukebox.c
src/jukebox.c
/* * Copyright (C) 2016, Michiel Sikma <[email protected]> * MIT License */ #include <stdio.h> #include "game.h" #include "jukebox.h" /** * Starts the jukebox. */ void start_jukebox() { start_game(); }
/* * Copyright (C) 2016, Michiel Sikma <[email protected]> * MIT License */ #include <stdio.h> #include "src/game.h" #include "src/jukebox.h" /** * Starts the jukebox. */ void start_jukebox() { start_game(); }
Use correct paths relative to root
Use correct paths relative to root
C
mit
msikma/ceegee,msikma/ceegee
697450ebcd4d1d87e34b61bf273505354dec2a91
test/cases/vla/check_align.c
test/cases/vla/check_align.c
// RUN: %ucc -o %t %s vla/check_align_asm.s // RUN: %t extern void check_align() __asm("check_align"); a() { int i = 1; short c[i]; c[0] = 0; check_align(c, i); } b() { int i = 3; char c[i]; c[0] = 0; c[1] = 0; c[2] = 0; check_align(c, i); } main() { a(); b(); return 0; }
// RUN: %ucc -o %t %s "$(dirname %s)"/check_align_asm.s // RUN: %t extern void check_align() __asm("check_align"); a() { int i = 1; short c[i]; c[0] = 0; check_align(c, i); } b() { int i = 3; char c[i]; c[0] = 0; c[1] = 0; c[2] = 0; check_align(c, i); } main() { a(); b(); return 0; }
Fix VLA stack alignment test / path
Fix VLA stack alignment test / path
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
cabc7f4405368319590d7df0ed48c60b0894082f
main.c
main.c
#include "vm.h" int* read_from_file(FILE* file) { int *instructions, idx = 0, count = 0; while (fgetc(file) != EOF) count++; rewind(file); instructions = malloc(count * sizeof(int)); for (idx=0; idx < count; idx++) { instructions[idx] = fgetc(file); } return instructions; } int main(int argc, const char* argv[]) { if (argc != 2) { fprintf(stderr, "Invalid args\n"); return -1; } else { printf( "%d\n", evaluate( read_from_file( fopen(argv[1], "rb") ) ) ); return 0; } }
Add code to read opcodes from file :P
Add code to read opcodes from file :P
C
mit
Mause/simvm
825e6b1aaf68fdc87768557bafc33d29279aa1b1
tests/regression/36-octapron/13-traces-min-rpb2.c
tests/regression/36-octapron/13-traces-min-rpb2.c
// PARAM: --sets ana.activated[+] octApron #include <pthread.h> #include <assert.h> int g = 1; int h = 1; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int x; // rand pthread_mutex_lock(&A); g = x; h = x; assert(g == h); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); pthread_mutex_unlock(&A); return NULL; } void *t2_fun(void *arg) { int x, y; // rand pthread_mutex_lock(&A); g = x; h = x; assert(g == h); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); if (y) g = x; else h = x; pthread_mutex_unlock(&A); return NULL; } int main(void) { pthread_t id, id2; pthread_create(&id, NULL, t_fun, NULL); pthread_create(&id2, NULL, t2_fun, NULL); assert(g == h); // UNKNOWN! pthread_mutex_lock(&A); assert(g == h); // UNKNOWN! pthread_mutex_unlock(&A); return 0; }
// PARAM: --sets ana.activated[+] octApron #include <pthread.h> #include <assert.h> int g = 1; int h = 1; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int x; // rand pthread_mutex_lock(&A); g = x; h = x; assert(g == h); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); pthread_mutex_unlock(&A); return NULL; } void *t2_fun(void *arg) { int x, y; // rand pthread_mutex_lock(&A); g = x; h = x; assert(g == h); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); pthread_mutex_unlock(&A); pthread_mutex_lock(&A); if (y) g = x; else h = x; assert(g == h); // UNKNOWN! pthread_mutex_unlock(&A); return NULL; } int main(void) { pthread_t id, id2; pthread_create(&id, NULL, t_fun, NULL); pthread_create(&id2, NULL, t2_fun, NULL); assert(g == h); // UNKNOWN! pthread_mutex_lock(&A); assert(g == h); // UNKNOWN! pthread_mutex_unlock(&A); return 0; }
Add extra assert to 36/13
Add extra assert to 36/13
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
ce235f4a0659a567394f9b540abaf732d6b2c765
firmware/voltage_encode.c
firmware/voltage_encode.c
#include <stdio.h> #include <stdint.h> static inline uint8_t rev8(uint8_t d) { int i; uint8_t out = 0; /* (from left to right) */ for (i = 0; i < 8; i++) if (d & (1 << i)) out |= (1 << (7 - i)); return out; } /* http://www.onsemi.com/pub_link/Collateral/ADP3208D.PDF */ static inline uint32_t encode_voltage(uint32_t v) { return rev8((0x78 - v / 125) << 1 | 1) << 8; } static inline uint32_t decode_voltage(uint32_t v) { return (0x78 - (rev8(v >> 8) >> 1)) * 125; } int main() { int v = 0; while (v < 15000) { printf("%d --> %04x | %d\n", v, encode_voltage(v), encode_voltage(v)); v += 125; } }
Add a simple voltage encode/decode c code
Add a simple voltage encode/decode c code
C
unlicense
Canaan-Creative/MM,Canaan-Creative/MM,Canaan-Creative/MM
aaadede7cfb154186bcf8f74927ca34ee1123264
source/glbinding/include/glbinding/Function.h
source/glbinding/include/glbinding/Function.h
#pragma once #include <functional> #include <glbinding/AbstractFunction.h> namespace { template <typename ReturnType, typename... Arguments> struct FunctionHelper; template <typename ReturnType, typename... Arguments> struct CallbackType { using type = std::function<void(Arguments..., ReturnType)>; }; template <typename... Arguments> struct CallbackType<void, Arguments...> { using type = std::function<void(Arguments...)>; }; } namespace glbinding { template <typename ReturnType, typename... Arguments> class Function : public AbstractFunction { friend struct FunctionHelper<ReturnType, Arguments...>; using Signature = ReturnType(*) (Arguments...); using BeforeCallback = std::function<void(Arguments...)>; using AfterCallback = typename CallbackType<ReturnType, Arguments...>::type; public: Function(const char * name); ReturnType operator()(Arguments&... arguments) const; //void addBeforeCallback(BeforeCallback callback); //void addAfterCallback(AfterCallback callback); protected: // std::vector<BeforeCallback> m_beforeCallbacks; // std::vector<AfterCallback> m_afterCallbacks; }; } // namespace glbinding #include <glbinding/Function.hpp>
#pragma once #include <functional> #include <glbinding/AbstractFunction.h> #ifndef WINAPI #ifdef _WIN32 #define WINAPI __stdcall #else #define WINAPI #endif #endif namespace { template <typename ReturnType, typename... Arguments> struct FunctionHelper; template <typename ReturnType, typename... Arguments> struct CallbackType { using type = std::function<void(Arguments..., ReturnType)>; }; template <typename... Arguments> struct CallbackType<void, Arguments...> { using type = std::function<void(Arguments...)>; }; } namespace glbinding { template <typename ReturnType, typename... Arguments> class Function : public AbstractFunction { friend struct FunctionHelper<ReturnType, Arguments...>; using Signature = ReturnType(WINAPI *) (Arguments...); using BeforeCallback = std::function<void(Arguments...)>; using AfterCallback = typename CallbackType<ReturnType, Arguments...>::type; public: Function(const char * name); ReturnType operator()(Arguments&... arguments) const; //void addBeforeCallback(BeforeCallback callback); //void addAfterCallback(AfterCallback callback); protected: // std::vector<BeforeCallback> m_beforeCallbacks; // std::vector<AfterCallback> m_afterCallbacks; }; } // namespace glbinding #include <glbinding/Function.hpp>
Add calling convention on windows
Add calling convention on windows
C
mit
hpi-r2d2/glbinding,hpi-r2d2/glbinding,cginternals/glbinding,j-o/glbinding,hpi-r2d2/glbinding,hpicgs/glbinding,hpi-r2d2/glbinding,mcleary/glbinding,hpicgs/glbinding,cginternals/glbinding,hpicgs/glbinding,mcleary/glbinding,j-o/glbinding,hpicgs/glbinding,mcleary/glbinding,j-o/glbinding,j-o/glbinding,mcleary/glbinding
c9c16148b9aa1afa02ac07e46d7ae090ab938a00
src/node.h
src/node.h
/* * node.h - type definition for node in a table */ #ifndef _NODE_H_ #define _NODE_H_ #include "table.h" #include "timestamp.h" typedef struct node { struct node *next; /* link to next node in the table */ struct node *prev; /* link to previous node in the table */ struct node *younger; /* link to next younger node */ unsigned char *tuple; /* pointer to Tuple in circ buffer */ unsigned short alloc_len; /* bytes allocated for tuple in circ buffer */ unsigned short real_len; /* actual lengthof the tuple in bytes */ struct table *parent; /* table to which node belongs */ tstamp_t tstamp; /* timestamp when entered into database nanoseconds since epoch */ } Node; #endif /* _NODE_H_ */
/* * Copyright (c) 2013, Court of the University of Glasgow * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of the University of Glasgow nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * node.h - type definition for node in a table */ #ifndef _NODE_H_ #define _NODE_H_ #include "table.h" #include "timestamp.h" typedef struct node { struct node *next; /* link to next node in the table */ struct node *prev; /* link to previous node in the table */ struct node *younger; /* link to next younger node */ unsigned char *tuple; /* pointer to Tuple in circ buffer */ unsigned short alloc_len; /* bytes allocated for tuple in circ buffer */ unsigned short real_len; /* actual lengthof the tuple in bytes */ struct table *parent; /* table to which node belongs */ tstamp_t tstamp; /* timestamp when entered into database nanoseconds since epoch */ } Node; #endif /* _NODE_H_ */
Add BSD 3-clause open source header
Add BSD 3-clause open source header
C
bsd-3-clause
jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache,fergul/Cache,jsventek/Cache
20c2122027dab79bda516c91fe924f23bc938794
include/matrix_constructors_impl.h
include/matrix_constructors_impl.h
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- template<class T> matrix<T>::matrix():data_(),rows_(0),cols_(0){} template<class T> matrix<T>::matrix( std::size_t rows, std::size_t cols ): data_(rows*cols),rows_(rows),cols_(cols){} template<class T> matrix<T>::matrix( std::initializer_list<std::initializer_list<T>> init_list): data_( make_vector(init_list) ), rows_(init_list.size()),cols_( init_list.begin()->size() ){} // !!! // // Is "init_list.begin()->size()" ok if init_list = {} ? // // !!!
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- template<class T> matrix<T>::matrix(): data_(), rows_(0), cols_(0) {} template<class T> matrix<T>::matrix( std::size_t rows, std::size_t cols ): data_(rows*cols), rows_(rows), cols_(cols) {} template<class T> matrix<T>::matrix( std::initializer_list<std::initializer_list<T>> init_list): data_( make_vector(init_list) ), rows_(init_list.size()), cols_( (init_list.size() > 0) ? init_list.begin()->size() : 0 ) {}
Add check for empty matrix in constructor.
Add check for empty matrix in constructor.
C
mit
actinium/cppMatrix,actinium/cppMatrix
b1c00a1eb1c2c7bae91d94232bce3537866d9ea2
include/arch/x86/cpu_state.h
include/arch/x86/cpu_state.h
#ifndef CPU_STATE_H #define CPU_STATE_H struct cpu_state { // Pushed by pusha uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; uint32_t eip, cs, eflags, useresp, ss; }; #endif
Define x86 CPU state structure
Define x86 CPU state structure
C
mit
awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,awensaunders/kernel-of-truth,awensaunders/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,Herbstein/kernel-of-truth,Herbstein/kernel-of-truth,Herbstein/kernel-of-truth,iankronquist/kernel-of-truth
4941fe015c2804a36b820818f4e8f68f867ed5b4
proj/android/library/src/main/native/log.h
proj/android/library/src/main/native/log.h
// // Created by Dawid Drozd aka Gelldur on 03.02.16. // #pragma once #include <android/log.h> #ifdef DEBUG #define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__) #define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__) #define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__) #define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__) #define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__) #else #define DLOG(...) #define ILOG(...) #define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__) #define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__) #define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__) #endif
// // Created by Dawid Drozd aka Gelldur on 03.02.16. // #pragma once #include <android/log.h> #ifndef NDEBUG #define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__) #define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__) #define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__) #define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__) #define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__) #else #define DLOG(...) #define ILOG(...) #define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__) #define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__) #define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__) #endif
Fix compile for debug on Android
Fix compile for debug on Android
C
apache-2.0
gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine
7a1425ecffc7f512889ff49fdc6bdd0f2bd373e8
battery_info.c
battery_info.c
#include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/power_supply.h> static int __init battery_status_init(void) { char name[] = "BAT0"; int result = 0; struct power_supply *psy = power_supply_get_by_name(name); union power_supply_propval chargenow, chargefull; result = psy->get_property(psy, POWER_SUPPLY_PROP_CHARGE_NOW, &chargenow); if (!result) { printk(KERN_INFO "The charge level is %d\n", chargenow.intval); } result = psy->get_property(psy, POWER_SUPPLY_PROP_CHARGE_FULL, &chargefull); if (!result) { printk(KERN_INFO "The charge level is %d\n", chargefull.intval); } return 0; } static void __exit battery_status_exit(void) { printk(KERN_INFO "Unload battery_status module\n"); } module_init(battery_status_init); module_exit(battery_status_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Miroslav Tisma <[email protected]>"); MODULE_DESCRIPTION("Battery status level module."); MODULE_VERSION("0.0.1");
Add battery info kernel module.
Add battery info kernel module.
C
apache-2.0
tisma/ctorious,tisma/ctorious
20e3779e5e81ded7c04010a29639f354b6742163
galpy/orbit_src/orbit_c_ext/integrateFullOrbit.h
galpy/orbit_src/orbit_c_ext/integrateFullOrbit.h
#ifndef __INTEGRATEFULLORBIT_H__ #define __INTEGRATEFULLORBIT_H__ #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 #include <Python.h> #endif #include <galpy_potentials.h> void parse_leapFuncArgs_Full(int, struct potentialArg *,int **,double **); #ifdef _WIN32 // On Windows, *need* to define this function to allow the package to be imported #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_galpy_integrate_c(void) // Python 3 #else PyMODINIT_FUNC initgalpy_integrate_c(void) // Python 2 #endif #endif #ifdef __cplusplus } #endif #endif /* integrateFullOrbit.h */
#ifndef __INTEGRATEFULLORBIT_H__ #define __INTEGRATEFULLORBIT_H__ #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 #include <Python.h> #endif #include <galpy_potentials.h> void parse_leapFuncArgs_Full(int, struct potentialArg *,int **,double **); #ifdef _WIN32 // On Windows, *need* to define this function to allow the package to be imported #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_galpy_integrate_c(void); // Python 3 #else PyMODINIT_FUNC initgalpy_integrate_c(void); // Python 2 #endif #endif #ifdef __cplusplus } #endif #endif /* integrateFullOrbit.h */
Add semicolon to function declarations [travis skip]
Add semicolon to function declarations [travis skip]
C
bsd-3-clause
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
9c0cb6985090006c2d70a1080a46239601dafe08
core/base/inc/TThreadSlots.h
core/base/inc/TThreadSlots.h
// @(#)root/thread:$Id$ // Author: Philippe Canal 09/30/2011 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TThreadSlots #define ROOT_TThreadSlots namespace ROOT { enum EThreadSlotReservation { // Describe the system wide slot pre-allocation in the TThread // 'special data' storage array ; meant to be used as thread local // storage. (See TThread::Tsd) // // Slot 0 through 19 can be used for user application // Slot 20 and above are reserved for the global system kMaxUserThreadSlot = 20, // Slot reserved by ROOT's packages. kPadThreadSlot = 20, kClassThreadSlot = 21, kDirectoryThreadSlot = 22, kFileThreadSlot = 23, kMaxThreadSlot = 24 // Size of the array of thread local slots in TThread }; } #ifndef __CINT__ R__EXTERN void **(*gThreadTsd)(void*,Int_t); #endif #endif // ROOT_TThreadSlots
// @(#)root/base:$Id$ // Author: Philippe Canal 09/30/2011 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TThreadSlots #define ROOT_TThreadSlots namespace ROOT { enum EThreadSlotReservation { // Describe the system wide slot pre-allocation in the TThread // 'special data' storage array ; meant to be used as thread local // storage. (See TThread::Tsd) // // Slot 0 through 19 can be used for user application // Slot 20 and above are reserved for the global system kMaxUserThreadSlot = 20, // Slot reserved by ROOT's packages. kPadThreadSlot = 20, kClassThreadSlot = 21, kDirectoryThreadSlot = 22, kFileThreadSlot = 23, kMaxThreadSlot = 24 // Size of the array of thread local slots in TThread }; } #ifndef __CINT__ R__EXTERN void **(*gThreadTsd)(void*,Int_t); #endif #endif // ROOT_TThreadSlots
Fix module loc. Add missing final newline.
Fix module loc. Add missing final newline. git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@41534 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical,bbockelm/root-historical
40f43230feaacb82b5d27a97a20d2329afef0f18
core/base/inc/TThreadSlots.h
core/base/inc/TThreadSlots.h
// @(#)root/thread:$Id$ // Author: Philippe Canal 09/30/2011 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TThreadSlots #define ROOT_TThreadSlots namespace ROOT { enum EThreadSlotReservation { // Describe the system wide slot pre-allocation in the TThread // 'special data' storage array ; meant to be used as thread local // storage. (See TThread::Tsd) // // Slot 0 through 19 can be used for user application // Slot 20 and above are reserved for the global system kMaxUserThreadSlot = 20, // Slot reserved by ROOT's packages. kPadThreadSlot = 20, kClassThreadSlot = 21, kDirectoryThreadSlot = 22, kFileThreadSlot = 23, kMaxThreadSlot = 24 // Size of the array of thread local slots in TThread }; } #ifndef __CINT__ R__EXTERN void **(*gThreadTsd)(void*,Int_t); #endif #endif // ROOT_TThreadSlots
// @(#)root/base:$Id$ // Author: Philippe Canal 09/30/2011 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TThreadSlots #define ROOT_TThreadSlots namespace ROOT { enum EThreadSlotReservation { // Describe the system wide slot pre-allocation in the TThread // 'special data' storage array ; meant to be used as thread local // storage. (See TThread::Tsd) // // Slot 0 through 19 can be used for user application // Slot 20 and above are reserved for the global system kMaxUserThreadSlot = 20, // Slot reserved by ROOT's packages. kPadThreadSlot = 20, kClassThreadSlot = 21, kDirectoryThreadSlot = 22, kFileThreadSlot = 23, kMaxThreadSlot = 24 // Size of the array of thread local slots in TThread }; } #ifndef __CINT__ R__EXTERN void **(*gThreadTsd)(void*,Int_t); #endif #endif // ROOT_TThreadSlots
Fix module loc. Add missing final newline.
Fix module loc. Add missing final newline. git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@41534 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT
499b14d0969ccaeb69ddcf1e3b0415df1f72f923
configreader.h
configreader.h
#ifndef CONFIGREADER_H #define CONFIGREADER_H /*forward declarations*/ extern FILE *configreaderin; struct config_ssid { char ssid_name[32]; char ssid_user[32]; char ssid_pass[32]; char ssid_bssid[25]; int ssid_8021x; struct config_ssid *next; }; struct config_interfaces { char if_name[32]; struct config_ssid *ssids; struct config_interfaces *next; }; extern struct config_interfaces *config; #endif // CONFIGREADER_H
#ifndef CONFIGREADER_H #define CONFIGREADER_H /*forward declarations*/ extern FILE *configreaderin; struct config_ssid { char ssid_name[32]; char ssid_user[32]; char ssid_pass[32]; char ssid_bssid[20]; char ssid_auth[10]; struct config_ssid *next; }; struct config_interfaces { char if_name[32]; struct config_ssid *ssids; struct config_interfaces *next; }; extern struct config_interfaces *config; #endif // CONFIGREADER_H
Change to config file struct
Change to config file struct
C
bsd-3-clause
myauie/wlan-daemon
7f580c5abe5aa3c7b4c712f69818543c27b924c6
tests/regression/01-cpa/58-base-ctx-insens-bot.c
tests/regression/01-cpa/58-base-ctx-insens-bot.c
// PARAM: --set ana.ctx_insens[+] base #include <stdlib.h> #include <assert.h> void foo(int cond) { assert(cond); // TODO to match assert } int main() { int *p = malloc(sizeof(int)); // blob is initially Bot while (1) { // blob joins Bot and 42 -> 42 // TODO: both should actually be UNKNOWN! to be sound assert(*p == 42); foo(*p == 42); // Bot -> Top, so foo has unknown and cannot narrow *p = 42; // blob becomes 42 } return 0; }
Add test for surprising imprecision with ctx_insens base
Add test for surprising imprecision with ctx_insens base Minimized from instrumented_cp_comb.c with __VERIFIER_assert function (not macro).
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
ca19cb39e3c68728bf9e9be569bbde87870508e9
libgnome/gnome-popt.h
libgnome/gnome-popt.h
#ifndef __GNOME_POPT_H__ #define __GNOME_POPT_H__ 1 #include <popt.h> #include "gnome-defs.h" BEGIN_GNOME_DECLS void gnomelib_register_popt_table(const struct poptOption *options, const char *description); poptContext gnomelib_parse_args(int argc, char *argv[], int popt_flags); /* Some systems, like Red Hat 4.0, define these but don't declare them. Hopefully it is safe to always declare them here. */ extern char *program_invocation_short_name; extern char *program_invocation_name; END_GNOME_DECLS #endif /* __GNOME_HELP_H__ */
#ifndef __GNOME_POPT_H__ #define __GNOME_POPT_H__ 1 #include <popt-gnome.h> #include "gnome-defs.h" BEGIN_GNOME_DECLS void gnomelib_register_popt_table(const struct poptOption *options, const char *description); poptContext gnomelib_parse_args(int argc, char *argv[], int popt_flags); /* Some systems, like Red Hat 4.0, define these but don't declare them. Hopefully it is safe to always declare them here. */ extern char *program_invocation_short_name; extern char *program_invocation_name; END_GNOME_DECLS #endif /* __GNOME_HELP_H__ */
Update popt, and always use the gnome-libs version instead of any system
Update popt, and always use the gnome-libs version instead of any system Update popt, and always use the gnome-libs version instead of any system version.
C
lgpl-2.1
Distrotech/libgnome,Distrotech/libgnome,Distrotech/libgnome
64dc9087a6c898d4436d7c63c65d4334c57fc03f
src/internal.h
src/internal.h
//// // __| | | _ _| __ / __| \ | // \__ \ __ | | / _| . | // ____/ _| _| ___| ____| ___| _|\_| // // Copyright (c) 2016 Jacob Hauberg Hansen // // This library is free software; you can redistribute and modify it // under the terms of the MIT license. See LICENSE for details. // #ifndef internal_h #define internal_h #define GLFW_INCLUDE_NONE #include <GL/gl3w.h> #include <GLFW/glfw3.h> typedef struct { bool is_initialized; bool is_focused; bool should_finish; GLFWwindow *window; } SHIZGraphicsContext; #endif // internal_h
Include GLFW/gl3w and add base graphics context
Include GLFW/gl3w and add base graphics context
C
mit
jhauberg/SHIZEN
27710f2e7a2a160c3aa70cd87d491b54b49c3d7b
views/controls/menu/native_menu_host_delegate.h
views/controls/menu/native_menu_host_delegate.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 VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ namespace views { namespace internal { class NativeMenuHostDelegate { public: virtual ~NativeMenuHostDelegate() {} }; } // namespace internal } // namespace views #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_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 VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ #define VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_ namespace views { namespace internal { class NativeMenuHostDelegate { public: virtual ~NativeMenuHostDelegate() {} }; } // namespace internal } // namespace views #endif // VIEWS_CONTROLS_MENU_NATIVE_MENU_HOST_DELEGATE_H_
Add newline to end of file.
Add newline to end of file. git-svn-id: http://src.chromium.org/svn/trunk/src@80087 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: 25bda12511d371bc9c02bf2454cce53241ee2abe
C
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser
cb9ed6bb55a5020770ad31fd30a05b4a91b70a81
nrf5/bluetooth_conf.h
nrf5/bluetooth_conf.h
#ifndef BLUETOOTH_CONF_H__ #define BLUETOOTH_CONF_H__ // SD specific configurations. #if (BLUETOOTH_SD == 110) #define MICROPY_PY_BLE (1) #define MICROPY_PY_BLE_NUS (0) #define BLUETOOTH_WEBBLUETOOTH_REPL (0) #define MICROPY_PY_UBLUEPY (1) #define MICROPY_PY_UBLUEPY_PERIPHERAL (1) #elif (BLUETOOTH_SD == 132) #define MICROPY_PY_BLE (1) #define MICROPY_PY_BLE_NUS (0) #define BLUETOOTH_WEBBLUETOOTH_REPL (0) #define MICROPY_PY_UBLUEPY (1) #define MICROPY_PY_UBLUEPY_PERIPHERAL (1) #define MICROPY_PY_UBLUEPY_CENTRAL (0) #else #error "SD not supported" #endif // Default defines. #ifndef MICROPY_PY_BLE #define MICROPY_PY_BLE (0) #endif #ifndef MICROPY_PY_BLE_NUS #define MICROPY_PY_BLE_NUS (0) #endif #endif
#ifndef BLUETOOTH_CONF_H__ #define BLUETOOTH_CONF_H__ // SD specific configurations. #if (BLUETOOTH_SD == 110) #define MICROPY_PY_BLE (1) #define MICROPY_PY_BLE_NUS (0) #define BLUETOOTH_WEBBLUETOOTH_REPL (0) #define MICROPY_PY_UBLUEPY (1) #define MICROPY_PY_UBLUEPY_PERIPHERAL (1) #elif (BLUETOOTH_SD == 132) #define MICROPY_PY_BLE (1) #define MICROPY_PY_BLE_NUS (0) #define BLUETOOTH_WEBBLUETOOTH_REPL (0) #define MICROPY_PY_UBLUEPY (1) #define MICROPY_PY_UBLUEPY_PERIPHERAL (1) #define MICROPY_PY_UBLUEPY_CENTRAL (1) #else #error "SD not supported" #endif // Default defines. #ifndef MICROPY_PY_BLE #define MICROPY_PY_BLE (0) #endif #ifndef MICROPY_PY_BLE_NUS #define MICROPY_PY_BLE_NUS (0) #endif #endif
Enable ubluepy central by default if running nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
nrf5/drivers/bluetooth: Enable ubluepy central by default if running nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
C
mit
adafruit/circuitpython,adafruit/micropython,adafruit/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/circuitpython
93f91dfa732eead8fbc938256b6883a93b847021
drivers/scsi/qla2xxx/qla_version.h
drivers/scsi/qla2xxx/qla_version.h
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.04.00.13-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 4 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
/* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.05.00.03-k" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 5 #define QLA_DRIVER_PATCH_VER 0 #define QLA_DRIVER_BETA_VER 0
Update the driver version to 8.05.00.03-k.
[SCSI] qla2xxx: Update the driver version to 8.05.00.03-k. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: James Bottomley <[email protected]>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
8c1eb4493a5b21a5cc47b2fd33f2faf9b80c4413
source/host/host_export.h
source/host/host_export.h
// // Aspia Project // Copyright (C) 2016-2022 Dmitry Chapyshev <[email protected]> // // 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 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // #ifndef HOST_HOST_EXPORT_H #define HOST_HOST_EXPORT_H #if defined(HOST_IMPLEMENTATION) #define HOST_EXPORT __declspec(dllexport) #else #define HOST_EXPORT __declspec(dllimport) #endif // defined(HOST_IMPLEMENTATION) #endif // HOST_HOST_EXPORT_H
// // Aspia Project // Copyright (C) 2016-2022 Dmitry Chapyshev <[email protected]> // // 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 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // #ifndef HOST_HOST_EXPORT_H #define HOST_HOST_EXPORT_H #include "build/build_config.h" #if defined(OS_WIN) #if defined(HOST_IMPLEMENTATION) #define HOST_EXPORT __declspec(dllexport) #else #define HOST_EXPORT __declspec(dllimport) #endif // defined(HOST_IMPLEMENTATION) #else #if defined(HOST_IMPLEMENTATION) #define HOST_EXPORT __attribute__((visibility("default"))) #else #define HOST_EXPORT #endif #endif #endif // HOST_HOST_EXPORT_H
Fix host building in Linux (part 2/x).
Fix host building in Linux (part 2/x).
C
mpl-2.0
aspia-org/remote-desktop,aspia-org/remote-desktop
99e747ceddb32b408921512979842251c28e54a5
src/modules/l_keyboard.c
src/modules/l_keyboard.c
/** * Copyright (c) 2017 rxi * * This library is free software; you can redistribute it and/or modify it * under the terms of the MIT license. See LICENSE for details. */ #include "keyboard.h" #include "luaobj.h" int l_keyboard_setKeyRepeat(lua_State *L) { keyboard_setKeyRepeat( lua_toboolean(L, 1) ); return 0; } int l_keyboard_isDown(lua_State *L) { int n = lua_gettop(L); int res = 0; int i; for (i = 1; i <= n; i++) { const char *key = luaL_checkstring(L, 1); res |= keyboard_isDown(key); } lua_pushboolean(L, res); return 1; } int luaopen_keyboard(lua_State *L) { luaL_Reg reg[] = { { "setKeyRepeat", l_keyboard_setKeyRepeat }, { "isDown", l_keyboard_isDown }, { 0, 0 }, }; luaL_newlib(L, reg); return 1; }
/** * Copyright (c) 2017 rxi * * This library is free software; you can redistribute it and/or modify it * under the terms of the MIT license. See LICENSE for details. */ #include "keyboard.h" #include "luaobj.h" int l_keyboard_setKeyRepeat(lua_State *L) { keyboard_setKeyRepeat( lua_toboolean(L, 1) ); return 0; } int l_keyboard_isDown(lua_State *L) { int n = lua_gettop(L); int res = 0; int i; for (i = 1; i <= n; i++) { const char *key = luaL_checkstring(L, i); res |= keyboard_isDown(key); } lua_pushboolean(L, res); return 1; } int luaopen_keyboard(lua_State *L) { luaL_Reg reg[] = { { "setKeyRepeat", l_keyboard_setKeyRepeat }, { "isDown", l_keyboard_isDown }, { 0, 0 }, }; luaL_newlib(L, reg); return 1; }
Fix keyboard.isDown check for multiple keys
Fix keyboard.isDown check for multiple keys
C
mit
rxi/lovedos,rxi/lovedos,rxi/lovedos
95bfaeec32c890c968f2dbd2fbf39e941629bbe7
AppIconOverlay/OverlayContext.h
AppIconOverlay/OverlayContext.h
// // Copyright (c) 2013 Carson McDonald // // 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. // #import <Foundation/Foundation.h> @interface OverlayContext : NSObject @property (nonatomic, copy) NSString *bannerText; @property (nonatomic, assign) CGFloat bannerHeightPadding; @property (nonatomic, assign) CGSize inputImageSize; @property (nonatomic, assign) CGSize bannerSize; @property (nonatomic, assign) CGContextRef workingContext; @property (nonatomic, assign) CGContextRef bannerContext; @property (nonatomic, copy) NSString *outputFilename; @end
// // Copyright (c) 2013 Carson McDonald // // 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. // #import <Foundation/Foundation.h> @interface OverlayContext : NSObject @property (nonatomic, copy) NSString *bannerText; @property (nonatomic, assign) CGFloat bannerHeightPadding; @property (nonatomic, assign) CGSize inputImageSize; @property (nonatomic, assign) CGSize bannerSize; @property (nonatomic, assign) CGContextRef workingContext; @property (nonatomic, assign) CGContextRef bannerContext; @property (nonatomic, copy) NSString *outputFilename; @property (nonatomic, copy) NSString *fontName; @end
Add font name to context.
Add font name to context.
C
mit
carsonmcdonald/AppIconOverlay
678b412c90c4392bc6459b13541ed80e37b68b35
src/util.h
src/util.h
#ifndef UTIL_H #define UTIL_H /*** Utility functions ***/ #define ALLOC(type) ((type*) xmalloc(sizeof(type))) void *xmalloc(size_t); #define STARTS_WITH(x, y) (strncmp((x), (y), sizeof(y) - 1) == 0) #endif /* UTIL_H */
#ifndef UTIL_H #define UTIL_H /*** Utility functions ***/ #define ALLOC(type) ((type*) xmalloc(sizeof(type))) void *xmalloc(size_t); #define STARTS_WITH(x, y) (strncmp((x), (y), strlen(y)) == 0) #endif /* UTIL_H */
Fix STARTS_WITH macro comparing 1 less character than needed
Fix STARTS_WITH macro comparing 1 less character than needed
C
apache-2.0
mopidy/libmockspotify,mopidy/libmockspotify,mopidy/libmockspotify
1843a02b1359aa796a71c45da5f3f07615ae0f9a
iree/compiler/Dialect/IREE/Transforms/Passes.h
iree/compiler/Dialect/IREE/Transforms/Passes.h
// Copyright 2019 Google LLC // // 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 // // https://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 IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ #define IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ #include "third_party/llvm/llvm-project/mlir//include/mlir/IR/Module.h" #include "third_party/llvm/llvm-project/mlir//include/mlir/Pass/Pass.h" namespace mlir { namespace iree_compiler { namespace IREE { std::unique_ptr<OpPassBase<ModuleOp>> createDropCompilerHintsPass(); } // namespace IREE } // namespace iree_compiler } // namespace mlir #endif // IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_
// Copyright 2019 Google LLC // // 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 // // https://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 IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ #define IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_ #include "mlir/IR/Module.h" #include "mlir/Pass/Pass.h" namespace mlir { namespace iree_compiler { namespace IREE { std::unique_ptr<OpPassBase<ModuleOp>> createDropCompilerHintsPass(); } // namespace IREE } // namespace iree_compiler } // namespace mlir #endif // IREE_COMPILER_DIALECT_IREE_TRANSFORMS_PASSES_H_
Fix include path typo from merge conflicts
Fix include path typo from merge conflicts PiperOrigin-RevId: 287685318
C
apache-2.0
google/iree,iree-org/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,iree-org/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,iree-org/iree
85a1c2100f452e25fba9c809d3ab25c51e97c3e1
include/llvm/Bitcode/BitcodeWriter.h
include/llvm/Bitcode/BitcodeWriter.h
//===-- llvm/Bitcode/BitcodeWriter.h - Bitcode writers ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This header defines interfaces to write LLVM bitcode files/streams. // //===----------------------------------------------------------------------===// #ifndef LLVM_BITCODE_BITCODEWRITER_H #define LLVM_BITCODE_BITCODEWRITER_H #include "llvm/IR/ModuleSummaryIndex.h" #include <string> namespace llvm { class Module; class raw_ostream; /// \brief Write the specified module to the specified raw output stream. /// /// For streams where it matters, the given stream should be in "binary" /// mode. /// /// If \c ShouldPreserveUseListOrder, encode the use-list order for each \a /// Value in \c M. These will be reconstructed exactly when \a M is /// deserialized. /// /// If \c Index is supplied, the bitcode will contain the summary index /// (currently for use in ThinLTO optimization). /// /// \p GenerateHash enables hashing the Module and including the hash in the /// bitcode (currently for use in ThinLTO incremental build). void WriteBitcodeToFile(const Module *M, raw_ostream &Out, bool ShouldPreserveUseListOrder = false, const ModuleSummaryIndex *Index = nullptr, bool GenerateHash = false); /// Write the specified module summary index to the given raw output stream, /// where it will be written in a new bitcode block. This is used when /// writing the combined index file for ThinLTO. When writing a subset of the /// index for a distributed backend, provide the \p ModuleToSummariesForIndex /// map. void WriteIndexToFile(const ModuleSummaryIndex &Index, raw_ostream &Out, const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex = nullptr); } // End llvm namespace #endif
Add missing file from r286566
Add missing file from r286566 Add the new BitcodeWriter.h header, which was missed in my r286566 commit, and should fix all the bot failures. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@286569 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm
b572830a52faad2fffc7119de53aa96c18d9bf07
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
//===-- MCJITMemoryManager.h - Definition for the Memory Manager ---C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_LIB_EXECUTIONENGINE_MCJITMEMORYMANAGER_H #define LLVM_LIB_EXECUTIONENGINE_MCJITMEMORYMANAGER_H #include "llvm/Module.h" #include "llvm/ExecutionEngine/JITMemoryManager.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" #include <assert.h> namespace llvm { // The MCJIT memory manager is a layer between the standard JITMemoryManager // and the RuntimeDyld interface that maps objects, by name, onto their // matching LLVM IR counterparts in the module(s) being compiled. class MCJITMemoryManager : public RTDyldMemoryManager { JITMemoryManager *JMM; // FIXME: Multiple modules. Module *M; public: MCJITMemoryManager(JITMemoryManager *jmm) : JMM(jmm) {} // Allocate ActualSize bytes, or more, for the named function. Return // a pointer to the allocated memory and update Size to reflect how much // memory was acutally allocated. uint64_t startFunctionBody(const char *Name, uintptr_t &Size) { Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); return (uint64_t)JMM->startFunctionBody(F, Size); } // Mark the end of the function, including how much of the allocated // memory was actually used. void endFunctionBody(const char *Name, uint64_t FunctionStart, uint64_t FunctionEnd) { Function *F = M->getFunction(Name); assert(F && "No matching function in JIT IR Module!"); // The JITMemoryManager interface makes the unfortunate assumption that // the address space/sizes we're compiling on are the same as what we're // compiling for, so it uses pointer types for its addresses. Explicit // casts between them to deal with that. return JMM->endFunctionBody(F, (uint8_t*)FunctionStart, (uint8_t*)FunctionEnd); } }; } // End llvm namespace #endif
Add missing file from r128851.
Add missing file from r128851. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@128856 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap
012509f72ac6024611266e424554881a161189e1
plugins/tracers/gstbitrate.h
plugins/tracers/gstbitrate.h
/* GstShark - A Front End for GstTracer * Copyright (C) 2016-2017 RidgeRun Engineering <[email protected]> * * This file is part of GstShark. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GST_BITRATE_TRACER_H__ #define __GST_BITRATE_TRACER_H__ #include "gstperiodictracer.h" G_BEGIN_DECLS typedef struct _GstBitrateTracer GstBitrateTracer; G_DECLARE_FINAL_TYPE (GstBitrateTracer, gst_bitrate_tracer, GST, BITRATE_TRACER, GstPeriodicTracer) G_END_DECLS #endif /* __GST_BITRATE_TRACER_H__ */
/* GstShark - A Front End for GstTracer * Copyright (C) 2016-2017 RidgeRun Engineering <[email protected]> * * This file is part of GstShark. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GST_BITRATE_TRACER_H__ #define __GST_BITRATE_TRACER_H__ #include "gstperiodictracer.h" G_BEGIN_DECLS #define GST_TYPE_BITRATE_TRACER (gst_bitrate_tracer_get_type ()) G_DECLARE_FINAL_TYPE (GstBitrateTracer, gst_bitrate_tracer, GST, BITRATE_TRACER, GstPeriodicTracer) G_END_DECLS #endif /* __GST_BITRATE_TRACER_H__ */
Fix definition for bitrate tracer type
Fix definition for bitrate tracer type
C
lgpl-2.1
RidgeRun/gst-shark,RidgeRun/gst-shark,RidgeRun/gst-shark
1d4efbd13c45b5e10c3355cef364031d822f44e2
numba/npyufunc/gufunc_scheduler.h
numba/npyufunc/gufunc_scheduler.h
#ifndef GUFUNC_SCHEDULER #define GUFUNC_SCHEDULER #include <stdint.h> #if __SIZEOF_POINTER__ == 8 #define intp int64_t #define uintp uint64_t #else #define intp int #define uintp unsigned #endif #ifdef __cplusplus extern "C" { #endif void do_scheduling(intp num_dim, intp *dims, uintp num_threads, intp *sched, intp debug); #ifdef __cplusplus } #endif #endif
#ifndef GUFUNC_SCHEDULER #define GUFUNC_SCHEDULER #include <stdint.h> #ifndef __SIZEOF_POINTER__ /* MSVC doesn't define __SIZEOF_POINTER__ */ #if defined(_WIN64) #define intp int64_t #define uintp uint64_t #elif defined(_WIN32) #define intp int #define uintp unsigned #else #error "cannot determine size of intp" #endif #elif __SIZEOF_POINTER__ == 8 #define intp int64_t #define uintp uint64_t #else #define intp int #define uintp unsigned #endif #ifdef __cplusplus extern "C" { #endif void do_scheduling(intp num_dim, intp *dims, uintp num_threads, intp *sched, intp debug); #ifdef __cplusplus } #endif #endif
Fix parfors on win64 due to incorrect size for intp type.
Fix parfors on win64 due to incorrect size for intp type.
C
bsd-2-clause
IntelLabs/numba,gmarkall/numba,gmarkall/numba,cpcloud/numba,IntelLabs/numba,seibert/numba,numba/numba,stuartarchibald/numba,seibert/numba,cpcloud/numba,jriehl/numba,stonebig/numba,cpcloud/numba,sklam/numba,stuartarchibald/numba,cpcloud/numba,IntelLabs/numba,jriehl/numba,IntelLabs/numba,stuartarchibald/numba,cpcloud/numba,jriehl/numba,stuartarchibald/numba,numba/numba,jriehl/numba,jriehl/numba,sklam/numba,numba/numba,seibert/numba,sklam/numba,numba/numba,seibert/numba,gmarkall/numba,numba/numba,stonebig/numba,gmarkall/numba,IntelLabs/numba,sklam/numba,stonebig/numba,gmarkall/numba,stonebig/numba,stonebig/numba,stuartarchibald/numba,sklam/numba,seibert/numba
fcd94f3e481afabca2de28339e3b23ceac0c75cf
bst.h
bst.h
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ struct BSTNode; struct BST; typedef struct BSTNode BSTNode; typedef struct BST BST; #endif
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ struct BSTNode; struct BST; typedef struct BSTNode BSTNode; typedef struct BST BST; BST* BST_Create(void); #endif
Add BST Create function declaration
Add BST Create function declaration
C
mit
MaxLikelihood/CADT
685fd9f92d7980591502c0bb2a344d601a0b9615
xmlwf/xmltchar.h
xmlwf/xmltchar.h
#ifdef XML_UNICODE #ifndef XML_UNICODE_WCHAR_T #error xmlwf requires a 16-bit Unicode-compatible wchar_t #endif #define T(x) L ## x #define ftprintf fwprintf #define tfopen _wfopen #define fputts fputws #define puttc putwc #define tcscmp wcscmp #define tcscpy wcscpy #define tcscat wcscat #define tcschr wcschr #define tcsrchr wcsrchr #define tcslen wcslen #define tperror _wperror #define topen _wopen #define tmain wmain #define tremove _wremove #else /* not XML_UNICODE */ #define T(x) x #define ftprintf fprintf #define tfopen fopen #define fputts fputs #define puttc putc #define tcscmp strcmp #define tcscpy strcpy #define tcscat strcat #define tcschr strchr #define tcsrchr strrchr #define tcslen strlen #define tperror perror #define topen open #define tmain main #define tremove remove #endif /* not XML_UNICODE */
Fix screwup in changing copyright notices
Fix screwup in changing copyright notices
C
mit
markpizz/expat,markpizz/expat,markpizz/expat
bea728b0f49fcb7fef74d34bfe7d19db4f09075b
test/Analysis/taint-tester.c
test/Analysis/taint-tester.c
// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest -verify %s int scanf(const char *restrict format, ...); int getchar(void); #define BUFSIZE 10 int Buffer[BUFSIZE]; void bufferScanfAssignment(int x) { int n; int *addr = &Buffer[0]; scanf("%d", &n); addr += n;// expected-warning {{tainted}} *addr = n; // expected-warning {{tainted}} }
// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.taint,debug.TaintTest -verify %s int scanf(const char *restrict format, ...); int getchar(void); #define BUFSIZE 10 int Buffer[BUFSIZE]; void bufferScanfAssignment(int x) { int n; int *addr = &Buffer[0]; scanf("%d", &n); addr += n;// expected-warning {{tainted}} *addr = n; // expected-warning {{tainted}} expected-warning {{tainted}} }
Add a missing taint tester warning.
[analyzer] Add a missing taint tester warning. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@145834 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
3a06db1675442564976b5d3df6986aa3330337ef
test/Driver/cl-include.c
test/Driver/cl-include.c
// Note: %s must be preceded by --, otherwise it may be interpreted as a // command-line option, e.g. on Mac where %s is commonly under /Users. // RUN: %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=BUILTIN // BUILTIN: "-internal-isystem" "{{.*lib.*clang.*[0-9]\.[0-9].*include}}" // RUN: %clang_cl -nobuiltininc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOBUILTIN // NOBUILTIN-NOT: "-internal-isystem" "{{.*lib.*clang.*[0-9]\.[0-9].*include}}" // RUN: env INCLUDE=/my/system/inc %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=STDINC // STDINC: "-internal-isystem" "/my/system/inc" // RUN: env INCLUDE=/my/system/inc %clang_cl -nostdinc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOSTDINC // NOSTDINC-NOT: "-internal-isystem" "/my/system/inc"
// Note: %s must be preceded by --, otherwise it may be interpreted as a // command-line option, e.g. on Mac where %s is commonly under /Users. // RUN: %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=BUILTIN // BUILTIN: "-internal-isystem" "{{.*lib.*clang.*include}}" // RUN: %clang_cl -nobuiltininc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOBUILTIN // NOBUILTIN-NOT: "-internal-isystem" "{{.*lib.*clang.*include}}" // RUN: env INCLUDE=/my/system/inc %clang_cl -### -- %s 2>&1 | FileCheck %s --check-prefix=STDINC // STDINC: "-internal-isystem" "/my/system/inc" // RUN: env INCLUDE=/my/system/inc %clang_cl -nostdinc -### -- %s 2>&1 | FileCheck %s --check-prefix=NOSTDINC // NOSTDINC-NOT: "-internal-isystem" "/my/system/inc"
Make the clang-cl test less restrictive.
Make the clang-cl test less restrictive. Make the test less restrictive to allow directory layout used in our test setup. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@304408 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
51dd9f30014d6b2345b0c27df1fd501c2446e93b
chrome/common/all_messages.h
chrome/common/all_messages.h
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Multiply-included file, hence no include guard. // Inclusion of all message files present in the system. Keep this file // up-to-date when adding a new value to enum IPCMessageStart in // ipc/ipc_message_utils.h to include the corresponding message file. #include "chrome/browser/importer/profile_import_process_messages.h" #include "chrome/common/automation_messages.h" #include "chrome/common/common_message_generator.h" #include "chrome/common/nacl_messages.h" #include "content/common/content_message_generator.h" #include "ppapi/proxy/ppapi_messages.h"
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Multiply-included file, hence no include guard. // Inclusion of all message files present in the system. Keep this file // up-to-date when adding a new value to enum IPCMessageStart in // ipc/ipc_message_utils.h to include the corresponding message file. #include "chrome/browser/importer/profile_import_process_messages.h" #include "chrome/common/common_message_generator.h" #include "chrome/common/nacl_messages.h" #include "content/common/content_message_generator.h" #include "content/common/pepper_messages.h" #include "ppapi/proxy/ppapi_messages.h"
Fix build break from bad merge
Fix build break from bad merge git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@106741 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
ropik/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium
9b590204de5ba4507d19340ceca17e529915df42
include/body.h
include/body.h
#ifndef CPR_BODY_H #define CPR_BODY_H #include <string> #include "defines.h" namespace cpr { class Body { public: template <typename TextType> Body(TextType&& p_text) : text{CPR_FWD(p_text)} {} std::string text; }; } // namespace cpr #endif
#ifndef CPR_BODY_H #define CPR_BODY_H #include <string> #include "defines.h" namespace cpr { class Body : public std::string { public: Body() = default; Body(const Body& rhs) = default; Body(Body&& rhs) = default; Body& operator=(const Body& rhs) = default; Body& operator=(Body&& rhs) = default; explicit Body(const char* raw_string) : std::string(raw_string) {} explicit Body(const char* raw_string, size_t length) : std::string(raw_string, length) {} explicit Body(size_t to_fill, char character) : std::string(to_fill, character) {} explicit Body(const std::string& std_string) : std::string(std_string) {} explicit Body(const std::string& std_string, size_t position, size_t length = std::string::npos) : std::string(std_string, position, length) {} explicit Body(std::initializer_list<char> il) : std::string(il) {} template <class InputIterator> explicit Body(InputIterator first, InputIterator last) : std::string(first, last) {} }; } // namespace cpr #endif
Make Body an opaque typedef of std::string
Make Body an opaque typedef of std::string
C
mit
msuvajac/cpr,SuperV1234/cpr,msuvajac/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,whoshuu/cpr,SuperV1234/cpr
49fd000db24f1e535ba13eb3e0b397cdb7b07007
wls.h
wls.h
int wls(double* X, int n, int p, double* y, double* w, double* XTX, double *sqw, double* sqwX, double* sqwy, double* coef);
int wls(double* X, int n, int p, double* y, double* w, double* XTX, double *sqw, double* sqwX, double* sqwy, double* coef); int calcFitted(double* X, int n, int p, double* y, double* coef, double* fitted); int calcResid(double* X, int n, int p, double* y, double* coef, double* resid);
Add calcFitted and calcResid definitions.
Add calcFitted and calcResid definitions.
C
mit
awblocker/go-lm,awblocker/go-lm
d989a56b3ceb47d6de82d0005d3f20a48d3b24e9
test/Driver/mingw-useld.c
test/Driver/mingw-useld.c
// RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_LD_32 %s // CHECK_LD_32: {{ld|ld.exe}}" // CHECK_LD_32: "i386pe" // CHECK_LD_32_NOT: "-flavor" "gnu" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_32 %s // CHECK_LLD_32: "lld" "-flavor" "gnu" // CHECK_LLD_32: "i386pe" // RUN: %clang -### -target i686-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=link.exe 2>&1 | FileCheck -check-prefix=CHECK_LINK_32 %s // CHECK_LINK_32: link.exe" // CHECK_LINK_32: "i386pe" // RUN: %clang -### -target x86_64-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_64 %s // CHECK_LLD_64: "lld" "-flavor" "gnu" // CHECK_LLD_64: "i386pep" // RUN: %clang -### -target arm-pc-windows-gnu --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -fuse-ld=lld 2>&1 | FileCheck -check-prefix=CHECK_LLD_ARM %s // CHECK_LLD_ARM: "lld" "-flavor" "gnu" // CHECK_LLD_ARM: "thumb2pe"
Add test case for mingw -fuse-ld= support introduced in r242121.
Add test case for mingw -fuse-ld= support introduced in r242121. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@253066 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
aba62b0799f87628580c92943152432e6118cedd
tests/regression/37-congruence/07-refinements-o.c
tests/regression/37-congruence/07-refinements-o.c
// PARAM: --enable ana.int.congruence void unsignedCase() { unsigned int top; unsigned int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); if(top %17 != 0) { i = 12; } } assert(i == 0); if(top % 3 == 17) { assert(top%17 == 3); //UNKNOWN! } } int main() { int top; int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); if(top %17 != 0) { i = 12; } } assert(i == 0); if(top % 3 == 17) { assert(top%17 == 3); //UNKNOWN! } unsignedCase(); }
// PARAM: --enable ana.int.congruence void unsignedCase() { unsigned int top; unsigned int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); if(top %17 != 0) { i = 12; } } assert(i == 0); if(top % 3 == 17) { // This is unreachable in the concrete! assert(top%17 == 3); //UNKNOWN! } } int main() { int top; int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); if(top %17 != 0) { i = 12; } } assert(i == 0); if(top % 3 == 17) { // This is unreachable in the concrete! assert(top%17 == 3); //UNKNOWN! } unsignedCase(); }
Add comments to confusing test
Add comments to confusing test
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
a833979af5fa88902eac3ab7a3b106ca6f0e5561
ComponentKit/Debug/CKComponentDebugController.h
ComponentKit/Debug/CKComponentDebugController.h
/* * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #import <Foundation/Foundation.h> #import <ComponentKit/CKComponentInternal.h> #import <ComponentKit/CKComponentViewConfiguration.h> @class CKComponent; @class UIView; /** CKComponentDebugController exposes the functionality needed by the lldb helpers to control the debug behavior for components. */ @interface CKComponentDebugController : NSObject + (BOOL)debugMode; /** Setting the debug mode enables the injection of debug configuration into the component. */ + (void)setDebugMode:(BOOL)debugMode; /** Components are an immutable construct. Whenever we make changes to the parameters on which the components depended, the changes won't be reflected in the component hierarchy until we explicitly cause a reflow/update. A reflow essentially rebuilds the component hierarchy and mounts it back on the view. This is particularly used in reflowing the component hierarchy when we set the debug mode. */ + (void)reflowComponents; @end /** Returns an adjusted mount context that inserts a debug view if the viewConfiguration doesn't have a view. */ CK::Component::MountContext CKDebugMountContext(Class componentClass, const CK::Component::MountContext &context, const CKComponentViewConfiguration &viewConfiguration, const CGSize size);
/* * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #import <Foundation/Foundation.h> #import <ComponentKit/CKComponentViewConfiguration.h> @class CKComponent; @class UIView; /** CKComponentDebugController exposes the functionality needed by the lldb helpers to control the debug behavior for components. */ @interface CKComponentDebugController : NSObject + (BOOL)debugMode; /** Setting the debug mode enables the injection of debug configuration into the component. */ + (void)setDebugMode:(BOOL)debugMode; /** Components are an immutable construct. Whenever we make changes to the parameters on which the components depended, the changes won't be reflected in the component hierarchy until we explicitly cause a reflow/update. A reflow essentially rebuilds the component hierarchy and mounts it back on the view. This is particularly used in reflowing the component hierarchy when we set the debug mode. */ + (void)reflowComponents; @end /** Returns an adjusted mount context that inserts a debug view if the viewConfiguration doesn't have a view. */ CK::Component::MountContext CKDebugMountContext(Class componentClass, const CK::Component::MountContext &context, const CKComponentViewConfiguration &viewConfiguration, const CGSize size);
Fix build error when importing debug controller header
Fix build error when importing debug controller header
C
bsd-3-clause
darknoon/componentkitx,darknoon/componentkitx,darknoon/componentkitx,darknoon/componentkitx
e24ef2a1f2725a9c01e6e011e38232af9e300f3a
src/core/map/ContactFilter.h
src/core/map/ContactFilter.h
// // Created by dar on 12/22/15. // #ifndef C003_CONTACTFILTER_H #define C003_CONTACTFILTER_H #include <Box2D/Dynamics/b2WorldCallbacks.h> #include <Box2D/Dynamics/b2Fixture.h> #include "../map/entity/Entity.h" class ContactFilter : public b2ContactFilter { bool doesCollide(void *a, void *b) { bool collisionAwithB = true, collisionBwithA = true; if (Entity *entity = reinterpret_cast<Entity *>(a)) { collisionAwithB = entity->doesCollide(reinterpret_cast<IPositionable *>(b)); } if (Entity *entity = reinterpret_cast<Entity *>(b)) { collisionBwithA = entity->doesCollide(reinterpret_cast<IPositionable *>(a)); } return collisionAwithB && collisionBwithA; } virtual bool ShouldCollide(b2Fixture *fixtureA, b2Fixture *fixtureB) override { void *bodyDataA = fixtureA->GetBody()->GetUserData(); void *bodyDataB = fixtureB->GetBody()->GetUserData(); return doesCollide(bodyDataA, bodyDataB); } }; #endif //C003_CONTACTFILTER_H
// // Created by dar on 12/22/15. // #ifndef C003_CONTACTFILTER_H #define C003_CONTACTFILTER_H #include <Box2D/Dynamics/b2WorldCallbacks.h> #include <Box2D/Dynamics/b2Fixture.h> #include "../map/entity/Entity.h" class ContactFilter : public b2ContactFilter { bool doesCollide(void *a, void *b) { bool collisionAwithB = true, collisionBwithA = true; if (Entity *entity = reinterpret_cast<Entity *>(a)) { collisionAwithB = entity->doesCollide(static_cast<IPositionable *>(b)); } if (Entity *entity = reinterpret_cast<Entity *>(b)) { collisionBwithA = entity->doesCollide(static_cast<IPositionable *>(a)); } return collisionAwithB && collisionBwithA; } virtual bool ShouldCollide(b2Fixture *fixtureA, b2Fixture *fixtureB) override { void *bodyDataA = fixtureA->GetBody()->GetUserData(); void *bodyDataB = fixtureB->GetBody()->GetUserData(); return doesCollide(bodyDataA, bodyDataB); } }; #endif //C003_CONTACTFILTER_H
Use static_cast in void* casting
Use static_cast in void* casting
C
mit
darsto/spooky,darsto/spooky
5c1bd508ee7f2583780d267c12e2557ec5045bec
thingshub/NSFileHandle+CDZCLIStringReading.h
thingshub/NSFileHandle+CDZCLIStringReading.h
// // NSFileHandle+CDZCLIStringReading.h // CDZCLIApplication // // Created by Chris Dzombak on 1/13/14. // Copyright (c) 2014 Chris Dzombak. All rights reserved. // @import Foundation; @interface NSFileHandle (CDZCLIStringReading) /// Read this handle's `-availableData` as a string, stripping any trailing newline. - (NSString *)cdz_availableString; @end
// // NSFileHandle+CDZCLIStringReading.h // CDZCLIApplication // // Created by Chris Dzombak on 1/13/14. // Copyright (c) 2014 Chris Dzombak. All rights reserved. // @import Foundation; @interface NSFileHandle (CDZCLIStringReading) /// Read this handle's `-availableData` as a string, stripping a single trailing newline. /// Useful with +[NSFileHandle fileHandleWithStandardInput]. - (NSString *)cdz_availableString; @end
Update docs on cdz_availableString NSFileHandle category method
Update docs on cdz_availableString NSFileHandle category method
C
mit
cdzombak/thingshub,cdzombak/thingshub,cdzombak/thingshub
651849d5367cc005d2b9284b0f29a9e5347c7c48
buffer.h
buffer.h
#ifndef BUFFER_H_ #define BUFFER_H_ #define BUFFER_SIZEOF_DESIRED 48 typedef struct Buffer { unsigned int pos; unsigned int size; char* data; char fixed[BUFFER_SIZEOF_DESIRED - 2*sizeof(unsigned int) - 1*sizeof(char*)]; } Buffer; Buffer* buffer_init(Buffer* buffer, unsigned int size); Buffer* buffer_fini(Buffer* buffer); Buffer* buffer_wrap(Buffer* buffer, const char* data, unsigned int length); Buffer* buffer_ensure_total(Buffer* buffer, unsigned int size); Buffer* buffer_ensure_unused(Buffer* buffer, unsigned int size); Buffer* buffer_reset(Buffer* buffer); Buffer* buffer_rewind(Buffer* buffer); Buffer* buffer_terminate(Buffer* buffer); Buffer* buffer_append(Buffer* buffer, const char* source, unsigned int length); #endif
#ifndef BUFFER_H_ #define BUFFER_H_ #define BUFFER_SIZEOF_DESIRED 64 typedef struct Buffer { unsigned int pos; unsigned int size; char* data; char fixed[BUFFER_SIZEOF_DESIRED - 2*sizeof(unsigned int) - 1*sizeof(char*)]; } Buffer; Buffer* buffer_init(Buffer* buffer, unsigned int size); Buffer* buffer_fini(Buffer* buffer); Buffer* buffer_wrap(Buffer* buffer, const char* data, unsigned int length); Buffer* buffer_ensure_total(Buffer* buffer, unsigned int size); Buffer* buffer_ensure_unused(Buffer* buffer, unsigned int size); Buffer* buffer_reset(Buffer* buffer); Buffer* buffer_rewind(Buffer* buffer); Buffer* buffer_terminate(Buffer* buffer); Buffer* buffer_append(Buffer* buffer, const char* source, unsigned int length); #endif
Increase stack array size from 48 to 64
Increase stack array size from 48 to 64
C
mit
gonzus/devel-cookie,gonzus/devel-cookie,gonzus/devel-cookie,gonzus/http-xscookies,gonzus/http-xscookies
e581eb9f332bde7e69cf4fa10a379d860e5d133a
Settings/SettingsUI.h
Settings/SettingsUI.h
#pragma once #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <malloc.h> #include <memory.h> #include <prsht.h> #include <stdlib.h> #include <tchar.h> #include "../3RVX/3RVX.h" #include "resource.h" class SettingsUI : public Window { public: SettingsUI(HINSTANCE hInstance); INT_PTR LaunchPropertySheet(); virtual LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); private: }; /* Forward Declarations */ LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam); BOOL CALLBACK GeneralTabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL CALLBACK DisplayTabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL CALLBACK OSDTabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL CALLBACK HotkeyTabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL CALLBACK AboutTabProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
#pragma once #define WIN32_LEAN_AND_MEAN #include <Windows.h> #include <malloc.h> #include <memory.h> #include <prsht.h> #include <stdlib.h> #include <tchar.h> #include <vector> #include "../3RVX/3RVX.h" #include "resource.h" class About; class Display; class General; class Hotkeys; class OSD; class TabPage; class SettingsUI : public Window { public: SettingsUI(HINSTANCE hInstance); INT_PTR LaunchPropertySheet(); virtual LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); private: std::vector<TabPage *> _tabs; General *_general; Display *_display; OSD *_osd; Hotkeys *_hotkeys; About *_about; private: /* Startup x/y location offsets */ static const int XOFFSET = 70; static const int YOFFSET = 20; }; /* Forward Declarations */ LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam);
Add instance variables, remove callbacks
Add instance variables, remove callbacks
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
6edee0b9551de3172d59abb5ea107a0ffd9e2345
config.h
config.h
/* Uncomment to compile with tcpd/libwrap support. */ //#define WITH_WRAP /* Compile with database upgrading support? If disabled, mosquitto won't * automatically upgrade old database versions. */ //#define WITH_DB_UPGRADE /* Compile with memory tracking support? If disabled, mosquitto won't track * heap memory usage nor export '$SYS/broker/heap/current size', but will use * slightly less memory and CPU time. */ #define WITH_MEMORY_TRACKING
/* Uncomment to compile with tcpd/libwrap support. */ //#define WITH_WRAP /* Compile with database upgrading support? If disabled, mosquitto won't * automatically upgrade old database versions. */ //#define WITH_DB_UPGRADE /* Compile with memory tracking support? If disabled, mosquitto won't track * heap memory usage nor export '$SYS/broker/heap/current size', but will use * slightly less memory and CPU time. */ #define WITH_MEMORY_TRACKING /* Compile with the ability to upgrade from old style sqlite persistent * databases to the new mosquitto format. This means a dependency on sqlite. It * isn't needed for new installations. */ #define WITH_SQLITE_UPGRADE
Add compile option for sqlite db upgrades.
Add compile option for sqlite db upgrades.
C
bsd-3-clause
zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto,zlargon/mosquitto
1e8e7adb26d12dc17ef4909e153f0c949883692d
src/kernel/task/task_alloc_onstack.c
src/kernel/task/task_alloc_onstack.c
/** * @file * * @date Nov 12, 2013 * @author: Anton Bondarev */ #include <stddef.h> #include <kernel/task.h> #include <kernel/thread/thread_stack.h> #include <kernel/panic.h> struct task *task_alloc(struct task *task, size_t task_size) { void *addr; assert(task); assert(task->main_thread); addr = thread_stack_get(task->main_thread); if (thread_stack_reserved(task->main_thread, task_size) < 0) { panic("Too small thread stack size"); } return addr; }
/** * @file * * @date Nov 12, 2013 * @author: Anton Bondarev */ #include <stddef.h> #include <kernel/task.h> #include <kernel/thread/thread_stack.h> #include <kernel/panic.h> struct task *task_alloc(struct task *task, size_t task_size) { void *addr; assert(task); assert(task->main_thread); addr = thread_stack_get(task->main_thread); if (thread_stack_reserved(task->main_thread, task_size) < 0) { panic("Too small thread stack size"); } return addr; }
Add newline between comments and includes
taskres: Add newline between comments and includes
C
bsd-2-clause
Kakadu/embox,embox/embox,Kakadu/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,Kefir0192/embox,Kakadu/embox,mike2390/embox,abusalimov/embox,mike2390/embox,embox/embox,vrxfile/embox-trik,mike2390/embox,gzoom13/embox,gzoom13/embox,Kefir0192/embox,gzoom13/embox,abusalimov/embox,embox/embox,vrxfile/embox-trik,Kefir0192/embox,mike2390/embox,mike2390/embox,Kefir0192/embox,vrxfile/embox-trik,abusalimov/embox,vrxfile/embox-trik,gzoom13/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,Kefir0192/embox,embox/embox,gzoom13/embox,abusalimov/embox,Kefir0192/embox,gzoom13/embox,abusalimov/embox,vrxfile/embox-trik,Kefir0192/embox,mike2390/embox,Kakadu/embox,embox/embox,abusalimov/embox,embox/embox,Kakadu/embox
948ec1820d49c8ec2ec68eb000e088ead4c3bf37
src/population.h
src/population.h
#ifndef POPULATION_H #define POPULATION_H class POPULATION { public: int **initializePopulation(int individuals, int genes, bool FILL_ZERO = false); int **createRandomPopulation(int **population, int individuals, int genes); }; #endif
#ifndef POPULATION_H #define POPULATION_H class POPULATION { public: int **initializePopulation(int individuals, int genes, bool FILL_ZERO = false); int createRandomPopulation(int **population, int individuals, int genes); }; #endif
Update return datatype function 'createRandomPopulation'.
Update return datatype function 'createRandomPopulation'.
C
mit
wkohlenberg/simple_GA
48ebeb144908b83d6ace61a7709267ae65048c7f
include/dsnutil/log/sinkmanager.h
include/dsnutil/log/sinkmanager.h
#ifndef SINKMANAGER_H #define SINKMANAGER_H #include <dsnutil/singleton.h> #include <dsnutil/log/base.h> #include <map> #include <string> #include <boost/shared_ptr.hpp> #include <boost/log/sinks.hpp> namespace dsn { namespace log { class SinkManager : public dsn::Singleton<SinkManager>, public Base<SinkManager> { friend class dsn::Singleton<SinkManager>; SinkManager(); ~SinkManager(); public: /// \brief Pointer to a managed log sink typedef boost::shared_ptr<boost::log::sinks::sink> sink_ptr; bool exists(const std::string& name) const; bool add(const std::string& name, const sink_ptr& sink); bool remove(const std::string& name); std::vector<std::string> sinks() const; sink_ptr sink(const std::string& name); private: /// \brief Storage container type for managed log sinks typedef std::map<std::string, sink_ptr> sink_storage; /// \brief Storage container for managed log sinks sink_storage m_sinks; }; } } #endif // SINKMANAGER_H
#ifndef SINKMANAGER_H #define SINKMANAGER_H #include <dsnutil/dsnutil_cpp_Export.h> #include <dsnutil/singleton.h> #include <dsnutil/log/base.h> #include <map> #include <string> #include <boost/shared_ptr.hpp> #include <boost/log/sinks.hpp> namespace dsn { namespace log { class dsnutil_cpp_EXPORT SinkManager : public dsn::Singleton<SinkManager>, public Base<SinkManager> { friend class dsn::Singleton<SinkManager>; SinkManager(); ~SinkManager(); public: /// \brief Pointer to a managed log sink typedef boost::shared_ptr<boost::log::sinks::sink> sink_ptr; bool exists(const std::string& name) const; bool add(const std::string& name, const sink_ptr& sink); bool remove(const std::string& name); std::vector<std::string> sinks() const; sink_ptr sink(const std::string& name); private: /// \brief Storage container type for managed log sinks typedef std::map<std::string, sink_ptr> sink_storage; /// \brief Storage container for managed log sinks sink_storage m_sinks; }; } } #endif // SINKMANAGER_H
Add missing DLL export for log::SinkManager
Add missing DLL export for log::SinkManager
C
bsd-3-clause
png85/dsnutil_cpp
849d9e94eeb91981ffb0e2b3bfb87e52583c4b6a
CommonFunc.h
CommonFunc.h
// CommonFunc.h -- header file /* * * Author: septimomend (Ivan Chapkailo) * * 30.06.2017 * */ #pragma once #include "stdafx.h" #include "AllControllers.h" #include "AdditionalBuffer.h" class Common : public AllControllers { public: Common(AllControllers* all); // cstr /* * draws */ void drawRows(Adbfr* abfr); void drawStatusBar(Adbfr* abfr); void drawMessageBar(Adbfr* abfr); /* * operations */ void statusMsg(const char *fmt, ...); void updateScreen(); char *callPrompt(char *prompt, void (*callback)(char *, int)); void scrolling(); private: ConfigurationController* m_cnfg; Adbfr m_abfr; };
// CommonFunc.h -- header file /* * * Author: septimomend (Ivan Chapkailo) * * 30.06.2017 * */ #pragma once #include "stdafx.h" #include "AllControllers.h" #include "AdditionalBuffer.h" class Common : public AllControllers { public: Common(AllControllers* all); // cstr /* * draws */ void drawRows(Adbfr* abfr); void drawStatusBar(Adbfr* abfr); void drawMessageBar(Adbfr* abfr); /* * operations */ void statusMsg(const char *fmt, ...); void updateScreen(); char *callPrompt(char *prompt, void (*callback)(char *, int)); void scrolling(); /* * TODO * * void moveCursor(int key); * void processKeypress(); */ private: ConfigurationController* m_cnfg; Adbfr m_abfr; };
Add new functions described in TODO comment
TODO: Add new functions described in TODO comment
C
mit
septimomend/UNIX-C-Text-Editor,septimomend/UNIX-C-Text-Editor
81de6e841c6775e619b94c12be49969be9d68968
libmypaint.c
libmypaint.c
/* Include this file in your project * if you don't want to build libmypaint as a separate library * Note that still need to do -I./path/to/libmypaint/sources * for the includes here to succeed. */ #include "mapping.c" #include "helpers.c" #include "brushmodes.c" #include "fifo.c" #include "operationqueue.c" #include "rng-double.c" #include "utils.c" #include "tilemap.c" #include "mypaint.c" #include "mypaint-brush.c" #include "mypaint-brush-settings.c" #include "mypaint-fixed-tiled-surface.c" #include "mypaint-surface.c" #include "mypaint-tiled-surface.c" #include "mypaint-rectangle.c"
/* Include this file in your project * if you don't want to build libmypaint as a separate library * Note that still need to do -I./path/to/libmypaint/sources * for the includes here to succeed. */ #include "helpers.c" #include "brushmodes.c" #include "fifo.c" #include "operationqueue.c" #include "rng-double.c" #include "utils.c" #include "tilemap.c" #include "mypaint.c" #include "mypaint-brush.c" #include "mypaint-brush-settings.c" #include "mypaint-fixed-tiled-surface.c" #include "mypaint-surface.c" #include "mypaint-tiled-surface.c" #include "mypaint-rectangle.c" #include "mypaint-mapping.c"
Remove a lingering ref to mapping.c
Remove a lingering ref to mapping.c
C
isc
achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint,achadwick/libmypaint
20f0178a232029bea7f34adecb6e5bdd6fada483
test/Analysis/outofbound.c
test/Analysis/outofbound.c
// RUN: clang -checker-simple -analyzer-store-region -verify %s char f1() { char* s = "abcd"; return s[4]; // expected-warning{{Load or store into an out-of-bound memory position.}} }
Add test case for out-of-bound memory access checking.
Add test case for out-of-bound memory access checking. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59931 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
e2463c6289e8b0821b2c76f010c922c58dd76aa0
polygonmain.c
polygonmain.c
#include <polygon.h> int main(int argc, char* argv[]) { Polygon lol; lol=createPolygon(); printf("\n\nx premier point : %f", lol->value.x); printf("\ny premier point : %f\n\n", lol->value.y); return EXIT_SUCCESS; }
Create the main program with print the coordinates of the first point of a newly generated polygon
Create the main program with print the coordinates of the first point of a newly generated polygon
C
mit
UTBroM/GeometricLib
4720a44172fff28774ded70c15f1df66a43b8b44
src/util/util_version.h
src/util/util_version.h
/* * Copyright 2011-2016 Blender Foundation * * 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 __UTIL_VERSION_H__ #define __UTIL_VERSION_H__ /* Cycles version number */ CCL_NAMESPACE_BEGIN #define CYCLES_VERSION_MAJOR 1 #define CYCLES_VERSION_MINOR 12 #define CYCLES_VERSION_PATCH 0 #define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c #define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c) #define CYCLES_VERSION_STRING \ CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH) CCL_NAMESPACE_END #endif /* __UTIL_VERSION_H__ */
/* * Copyright 2011-2016 Blender Foundation * * 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 __UTIL_VERSION_H__ #define __UTIL_VERSION_H__ /* Cycles version number */ CCL_NAMESPACE_BEGIN #define CYCLES_VERSION_MAJOR 1 #define CYCLES_VERSION_MINOR 13 #define CYCLES_VERSION_PATCH 0 #define CYCLES_MAKE_VERSION_STRING2(a, b, c) #a "." #b "." #c #define CYCLES_MAKE_VERSION_STRING(a, b, c) CYCLES_MAKE_VERSION_STRING2(a, b, c) #define CYCLES_VERSION_STRING \ CYCLES_MAKE_VERSION_STRING(CYCLES_VERSION_MAJOR, CYCLES_VERSION_MINOR, CYCLES_VERSION_PATCH) CCL_NAMESPACE_END #endif /* __UTIL_VERSION_H__ */
Bump version to 1.13, matching blender 2.90 release cycle
Bump version to 1.13, matching blender 2.90 release cycle
C
apache-2.0
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
96c9be5cd8c08e270a848b36f010a266ecb56931
menpo/feature/cpp/WindowFeature.h
menpo/feature/cpp/WindowFeature.h
#pragma once #if _MSC_VER < 1900 #define round(x) (x >= 0 ? (x + 0.5) : (x - 0.5)) #endif class WindowFeature { public: WindowFeature(); virtual ~WindowFeature(); virtual void apply(double *windowImage, double *descriptorVector) = 0; unsigned int descriptorLengthPerWindow; };
#pragma once #if defined(_MSC_VER) && _MSC_VER < 1900 #define round(x) (x >= 0 ? (x + 0.5) : (x - 0.5)) #endif class WindowFeature { public: WindowFeature(); virtual ~WindowFeature(); virtual void apply(double *windowImage, double *descriptorVector) = 0; unsigned int descriptorLengthPerWindow; };
Check _MSC_VER is defined and less than 1900
Check _MSC_VER is defined and less than 1900
C
bsd-3-clause
grigorisg9gr/menpo,menpo/menpo,menpo/menpo,grigorisg9gr/menpo,grigorisg9gr/menpo,menpo/menpo,patricksnape/menpo,yuxiang-zhou/menpo,patricksnape/menpo,yuxiang-zhou/menpo,patricksnape/menpo,yuxiang-zhou/menpo
995d9a599905dfbb059b7c5d3ba8b0af240e42d5
021.calling_c/c_code.c
021.calling_c/c_code.c
typedef union { unsigned char* ptr; unsigned short word[2]; } word_extract_t; void PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned offset, unsigned numBitplanes, unsigned screenWidthBytes) { int i; copper += offset; for (i = 0; i < numBitplanes; i++) { word_extract_t extract; extract.ptr = bitplanes; *(copper+1) = extract.word[1]; *(copper+3) = extract.word[0]; bitplanes += screenWidthBytes; copper += 4; } } static unsigned short _copperData; static unsigned char _bitplaneData; void TestCall() { PokeBitplanePointers(&_copperData, &_bitplaneData, 3, 4, 5); }
typedef union { unsigned char* ptr; struct { unsigned short hi; unsigned short lo; } words; } word_extract_t; void PokeBitplanePointers(unsigned short* copper, unsigned char* bitplanes, unsigned offset, unsigned numBitplanes, unsigned screenWidthBytes) { int i; copper += offset; for (i = 0; i < numBitplanes; i++) { word_extract_t extract; extract.ptr = bitplanes; *(copper+1) = extract.words.lo; *(copper+3) = extract.words.hi; bitplanes += screenWidthBytes; copper += 4; } } static unsigned short _copperData; static unsigned char _bitplaneData; void TestCall() { PokeBitplanePointers(&_copperData, &_bitplaneData, 3, 4, 5); }
Make C example more C, less asm
Make C example more C, less asm
C
bsd-2-clause
alpine9000/amiga_examples,alpine9000/amiga_examples,alpine9000/amiga_examples
ee41eea947ebe2f1f627fafe0e429b5dcaaab944
arch/powerpc/boot/reg.h
arch/powerpc/boot/reg.h
#ifndef _PPC_BOOT_REG_H #define _PPC_BOOT_REG_H /* * Copyright 2007 Davud Gibson, IBM Corporation. * * 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. */ static inline u32 mfpvr(void) { u32 pvr; asm volatile ("mfpvr %0" : "=r"(pvr)); return pvr; } register void *__stack_pointer asm("r1"); #define get_sp() (__stack_pointer) #endif /* _PPC_BOOT_REG_H */
#ifndef _PPC_BOOT_REG_H #define _PPC_BOOT_REG_H /* * Copyright 2007 Davud Gibson, IBM Corporation. * * 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. */ static inline u32 mfpvr(void) { u32 pvr; asm volatile ("mfpvr %0" : "=r"(pvr)); return pvr; } #define __stringify_1(x) #x #define __stringify(x) __stringify_1(x) #define mfspr(rn) ({unsigned long rval; \ asm volatile("mfspr %0," __stringify(rn) \ : "=r" (rval)); rval; }) #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v)) register void *__stack_pointer asm("r1"); #define get_sp() (__stack_pointer) #endif /* _PPC_BOOT_REG_H */
Add mfspr/mtspr inline macros to 4xx bootwrapper
[POWERPC] 4xx: Add mfspr/mtspr inline macros to 4xx bootwrapper The 4xx bootwrapper occasionally needs to access SPR registers, this adds mfspr/mtspr wrappers to it. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Josh Boyer <[email protected]>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
08c3a7a1490994541c1771fc5b1e968f040277ab
src/error.c
src/error.c
#include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "error.h" static char *pname; void setpname(char *name) { pname = name; } char * getpname(void) { return pname; } static inline void vwarn(const char *fmt, va_list al) { fflush(NULL); if (pname != NULL) fprintf(stderr, "%s: ", pname); vfprintf(stderr, fmt, al); if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':') fprintf(stderr, " %s", strerror(errno)); fprintf(stderr, "\n"); } void warn(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); } void die(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); exit(0); } void panic(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); abort(); }
#include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "error.h" static char *pname; void setpname(char *name) { pname = name; } char * getpname(void) { return pname; } static inline void vwarn(const char *fmt, va_list al) { fflush(NULL); if (pname != NULL) fprintf(stderr, "%s: ", pname); vfprintf(stderr, fmt, al); if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':') fprintf(stderr, " %s", strerror(errno)); fprintf(stderr, "\n"); } void warn(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); } void die(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); exit(2); } void panic(const char *fmt, ...) { va_list al; va_start(al, fmt); vwarn(fmt, al); va_end(al); abort(); }
Change function die to exit with status 2 instead of 0
Change function die to exit with status 2 instead of 0
C
isc
flimberger/qsmerge,flimberger/qsmerge
6fbbd5dad25f58fc79c7e9b42528e3f21ebe6ba8
include/kbd.h
include/kbd.h
#ifndef H_KBD #define H_KBD #include <stddef.h> #include <stdbool.h> struct keyevent { int keycode; char character; bool release; bool shift; bool ctrl; } keybuffer[128]; void kbdinit(); bool kbdavail(); struct keyevent* kbdpoll(); void kbdregsig(bool* b); void kbdunregsig(bool* b); #endif
#ifndef H_KBD #define H_KBD #include <stddef.h> #include <stdbool.h> struct keyevent { int keycode; char character; bool release; bool shift; bool ctrl; } keybuffer[256]; void kbdinit(); bool kbdavail(); struct keyevent* kbdpoll(); void kbdregsig(bool* b); void kbdunregsig(bool* b); #endif
Raise keyboard event stack size to 256
Raise keyboard event stack size to 256
C
bsd-2-clause
Easimer/easios,Easimer/easios,Easimer/easios
711ac30abb29d7209f685227f3a1f978a0d01390
IAAI.c
IAAI.c
#include <stdio.h> #include <stdlib.h> int main() { system("/bin/stty raw"); int i = 0; char str[] = "I AM AN IDIOT "; while(1){ for(i = 0; i<14; i++) { getchar(); printf("\b%c", str[i]); } system("/bin/stty cooked"); printf("\n"); system("/bin/stty raw"); } return 0; }
#include <stdio.h> #include <stdlib.h> #define STTY "/bin/stty " const char RAW[] = STTY "raw"; const char COOKED[] = STTY "cooked"; int main() { system(RAW); int i = 0; char str[] = "I AM AN IDIOT "; while(1){ for(i = 0; i<14; i++) { getchar(); printf("\b%c", str[i]); } system(COOKED); printf("\n"); system(RAW); } return 0; }
Make it easier to change stty constant if needed
Make it easier to change stty constant if needed
C
mit
vinamarora8/IAAI
216591596dfbb35c79674c18d0c6f28e1e040857
src/mb.h
src/mb.h
/* * mb.h - publicly accessible entry points for the memory buffer */ #ifndef _MB_H_ #define _MB_H_ #include "tuple.h" #include "table.h" #include "timestamp.h" void mb_init(); int mb_insert(unsigned char *buf, long len, Table *table); tstamp_t mb_insert_tuple(int ncols, char *vals[], Table *table); tstamp_t heap_insert_tuple(int ncols, char *vals[], Table *table, Node *n); Node *heap_alloc_node(int ncols, char *vals[], Table *table); void heap_remove_node(Node *n, Table *tn); void mb_dump(); #endif /* _MB_H_ */
/* * Copyright (c) 2013, Court of the University of Glasgow * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of the University of Glasgow nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* * mb.h - publicly accessible entry points for the memory buffer */ #ifndef _MB_H_ #define _MB_H_ #include "tuple.h" #include "table.h" #include "timestamp.h" void mb_init(); int mb_insert(unsigned char *buf, long len, Table *table); tstamp_t mb_insert_tuple(int ncols, char *vals[], Table *table); tstamp_t heap_insert_tuple(int ncols, char *vals[], Table *table, Node *n); Node *heap_alloc_node(int ncols, char *vals[], Table *table); void heap_remove_node(Node *n, Table *tn); void mb_dump(); #endif /* _MB_H_ */
Add BSD 3-clause open source header
Add BSD 3-clause open source header
C
bsd-3-clause
jsventek/Cache,fergul/Cache,jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache