commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
94ed2e430b1180c296f7dcb327296c64d6260daa
fmacros.h
fmacros.h
#ifndef __HIREDIS_FMACRO_H #define __HIREDIS_FMACRO_H #if defined(__linux__) #define _BSD_SOURCE #define _DEFAULT_SOURCE #endif #if defined(__CYGWIN__) #include <sys/cdefs.h> #endif #if defined(__sun__) #define _POSIX_C_SOURCE 200112L #else #if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__)) #define _XOPEN_SOURCE 600 #endif #endif #if defined(__APPLE__) && defined(__MACH__) #define _OSX #endif #endif
#ifndef __HIREDIS_FMACRO_H #define __HIREDIS_FMACRO_H #if defined(__linux__) #define _BSD_SOURCE #define _DEFAULT_SOURCE #endif #if defined(__CYGWIN__) #include <sys/cdefs.h> #endif #if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) #define _XOPEN_SOURCE 600 #elif defined(__APPLE__) && defined(__MACH__) #define _XOPEN_SOURCE #elif defined(__FreeBSD__) // intentionally left blank, don't define _XOPEN_SOURCE #else #define _XOPEN_SOURCE #endif #if defined(__sun__) #define _POSIX_C_SOURCE 200112L #endif #if defined(__APPLE__) && defined(__MACH__) #define _OSX #endif #endif
Make XOPEN_SOURCE definition explicit per architecture
Make XOPEN_SOURCE definition explicit per architecture Fixes #441
C
bsd-3-clause
charsyam/hiredis,redis/hiredis,thomaslee/hiredis,jinguoli/hiredis,jinguoli/hiredis,jinguoli/hiredis,redis/hiredis,thomaslee/hiredis,redis/hiredis,charsyam/hiredis
33ce733a70bf89570454a161a64adb56da57a0f3
Settings/Tabs/SettingsTab.h
Settings/Tabs/SettingsTab.h
#pragma once #include "../Controls/Controls.h" #include "../Controls/TabPage.h" /// <summary> /// Abstract class that encapsulates functionality for dealing with /// property sheet pages (tabs). /// </summary> class SettingsTab : public TabPage { public: SettingsTab(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L""); ~SettingsTab(); /// <summary>Processes messages sent to the tab page.</summary> virtual INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); /// <summary>Persists changes made on the tab page</summary> virtual void SaveSettings() = 0; protected: /// <summary> /// Performs intitialization for the tab page, similar to a constructor. /// Since tab page windows are created on demand, this method could be /// called much later than the constructor for the tab. /// </summary> virtual void Initialize() = 0; /// <summary>Applies the current settings state to the tab page.</summary> virtual void LoadSettings() = 0; };
#pragma once #include "../Controls/Controls.h" #include "../Controls/TabPage.h" #include "../resource.h" /// <summary> /// Abstract class that encapsulates functionality for dealing with /// property sheet pages (tabs). /// </summary> class SettingsTab : public TabPage { public: SettingsTab(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L""); ~SettingsTab(); /// <summary>Processes messages sent to the tab page.</summary> virtual INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); /// <summary>Persists changes made on the tab page</summary> virtual void SaveSettings() = 0; protected: /// <summary> /// Performs intitialization for the tab page, similar to a constructor. /// Since tab page windows are created on demand, this method could be /// called much later than the constructor for the tab. /// </summary> virtual void Initialize() = 0; /// <summary>Applies the current settings state to the tab page.</summary> virtual void LoadSettings() = 0; };
Include dialog resources to make things easier
Include dialog resources to make things easier
C
bsd-2-clause
malensek/3RVX,malensek/3RVX,malensek/3RVX
1faf4681396ca217899ace40a2b60b04a2a8e3c3
config.h
config.h
#ifndef THM_CONFIG_HG #define THM_CONFIG_HG // Vertex ID type // # of vertices < MAX(thm_Vid) typedef unsigned long thm_Vid; // Arc reference type // # of arcs in any digraph <= MAX(thm_Arcref) typedef unsigned long thm_Arcref; // Block label type // # of blocks < MAX(thm_Blklab) typedef unsigned long thm_Blklab; #endif
#ifndef THM_CONFIG_HG #define THM_CONFIG_HG // Block label type (must be unsigned) // # of blocks <= MAX(thm_Blklab) typedef uint32_t thm_Blklab; #endif
Move typedef to digraph header
Move typedef to digraph header
C
lgpl-2.1
fsavje/scclust,fsavje/scclust,fsavje/scclust
e8a46c51e607caedec168f26c73595fed10b3afb
lib/shared/mem.h
lib/shared/mem.h
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); void xmemreport (void); #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
#ifndef MEM_H__ #define MEM_H__ #include <stdlib.h> void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); size_t xmembytes(); size_t xmemnew(); size_t xmemfreed(); void xmemreport (void); #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */
Add report functions for x*()
Add report functions for x*() Signed-off-by: Olivier Mehani <9858fe98d2c7f5f35e0d2a08f134cfc58afd42d3@nicta.com.au>
C
mit
lees0414/EUproject,mytestbed/oml,mytestbed/oml,lees0414/EUproject,alco90/soml,alco90/soml,lees0414/EUproject,lees0414/EUproject,mytestbed/oml,mytestbed/oml,alco90/soml,alco90/soml,mytestbed/oml,lees0414/EUproject,alco90/soml
ee3a5993668d17a478a4e1ec7edd2f706b5bdfce
include/cpr/body.h
include/cpr/body.h
#ifndef CPR_BODY_H #define CPR_BODY_H #include <cstring> #include <initializer_list> #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
#ifndef CPR_BODY_H #define CPR_BODY_H #include <cstring> #include <initializer_list> #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::string&& std_string) : std::string(std::move(std_string)) {} 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
Move constructor from std::string for cpr::Body
Move constructor from std::string for cpr::Body Currently it uses only copy-stors.
C
mit
whoshuu/cpr,whoshuu/cpr,whoshuu/cpr
b1de9c948f9794db97ed7d34b8cbcdccc206ea77
src/gallium/drivers/nv30/nv30_clear.c
src/gallium/drivers/nv30/nv30_clear.c
#include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" #include "nv30_context.h" void nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps, unsigned clearValue) { pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue); }
#include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" #include "nv30_context.h" void nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps, unsigned clearValue) { pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue); ps->status = PIPE_SURFACE_STATUS_CLEAR; }
Set pipe status on clear
nv30: Set pipe status on clear
C
mit
metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,KTXSoftware/glsl2agal,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,adobe/glsl2agal,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,adobe/glsl2agal,wolf96/glsl-optimizer,benaadams/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,wolf96/glsl-optimizer,bkaradzic/glsl-optimizer,adobe/glsl2agal,jbarczak/glsl-optimizer,adobe/glsl2agal,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,metora/MesaGLSLCompiler,zeux/glsl-optimizer,KTXSoftware/glsl2agal,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,KTXSoftware/glsl2agal,benaadams/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,zz85/glsl-optimizer,adobe/glsl2agal,zz85/glsl-optimizer,jbarczak/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,KTXSoftware/glsl2agal,jbarczak/glsl-optimizer
22c6aa126d7d88b4e19c64418aeecdc6cc032233
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 85 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 86 #endif
Update Skia milestone to 86
Update Skia milestone to 86 Change-Id: Id81c58007f74816a8c2ac0831d61c041c5a7468c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298916 Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia
03186dd5ad61d9d9bc366ec5e23e313910ddb48f
sigaltstack.c
sigaltstack.c
#include <stdio.h> #include <signal.h> #include <unistd.h> #include <assert.h> #include <stdlib.h> #include <setjmp.h> jmp_buf try; void handler(int sig) { static int i = 0; write(2, "stack overflow\n", 15); longjmp(try, ++i); _exit(1); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { static char stack[SIGSTKSZ]; stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
#include <stdio.h> #include <signal.h> #include <unistd.h> #include <assert.h> #include <stdlib.h> #include <setjmp.h> jmp_buf try; void handler(int sig) { static int i = 0; write(2, "stack overflow\n", 15); longjmp(try, ++i); _exit(1); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
Put alternate stack on heap
Put alternate stack on heap
C
apache-2.0
danluu/setjmp-longjmp-ucontext-snippets,danluu/setjmp-longjmp-ucontext-snippets
4222e15ceb2f64cbc517d8290d2c8fb7c2a6b178
include/patts/admin.h
include/patts/admin.h
/* * libpatts - Backend library for PATTS Ain't Time Tracking Software * Copyright (C) 2014 Delwink, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DELWINK_PATTS_ADMIN_H #define DELWINK_PATTS_ADMIN_H #include <cquel.h> #ifdef __cplusplus extern "C" { #endif int patts_create_user(const struct dlist *info, const char *host, const char *passwd); int patts_create_task(const struct dlist *info); int patts_enable_user(const char *id); int patts_enable_task(const char *id); int patts_disable_user(const char *id); int patts_disable_task(const char *id); int patts_grant_admin(const char *id); int patts_revoke_admin(const char *id); #ifdef __cplusplus } #endif #endif
/* * libpatts - Backend library for PATTS Ain't Time Tracking Software * Copyright (C) 2014 Delwink, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation. * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DELWINK_PATTS_ADMIN_H #define DELWINK_PATTS_ADMIN_H #include <cquel.h> #ifdef __cplusplus extern "C" { #endif int patts_create_user(const struct dlist *info, const char *host, const char *passwd); int patts_create_task(const struct dlist *info); int patts_delete_user(const char *id); int patts_delete_task(const char *id); int patts_grant_admin(const char *id); int patts_revoke_admin(const char *id); #ifdef __cplusplus } #endif #endif
Change scope of state column
Change scope of state column
C
agpl-3.0
delwink/libpatts,delwink/libpatts
e6afdae011102bc110d072c33e2704bccc7cc6e4
utils.h
utils.h
#ifndef UTILS_H #define UTILS_H #include <string> /** \brief Convert given container to it's hex representation */ template< typename T > std::string toHex( const T& data ) { static const char charTable[] = "0123456789abcdef"; std::string ret; if ( data.size() > 1024 ) { ret = "*** LARGE *** "; for ( size_t i=0; i<40; i++ ) { ret.push_back( charTable[ ( data[i] >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } ret.append("..."); for ( size_t i=data.size()-40; i<data.size(); i++ ) { ret.push_back( charTable[ ( data[i] >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } } else { for ( const auto& val: data ) { ret.push_back( charTable[ ( val >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( val >> 0 ) & 0xF ] ); } } return ret; } #endif // UTILS_H
#ifndef UTILS_H #define UTILS_H #include <string> /** \brief Convert given container to it's hex representation */ template< typename T > std::string toHex( const T& data ) { static const char charTable[] = "0123456789abcdef"; std::string ret; if ( data.size() > 80 ) { ret = "*** LARGE *** "; for ( size_t i=0; i<40; i++ ) { ret.push_back( charTable[ ( data[i] >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } ret.append("..."); for ( size_t i=data.size()-40; i<data.size(); i++ ) { ret.push_back( charTable[ ( data[i] >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } } else { for ( const auto& val: data ) { ret.push_back( charTable[ ( val >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( val >> 0 ) & 0xF ] ); } } return ret; } #endif // UTILS_H
Make the hex dump size limit much smaller
Make the hex dump size limit much smaller
C
bsd-3-clause
cinode/cpptestapp,cinode/cpptestapp
ec43d9ca215e7e9f0ea782e26367d52c9468f7ff
src/lextest.c
src/lextest.c
#include "config.h" #include <stdio.h> #include <string.h> #include "lexicon.h" #include "hash.h" #include "array.h" #include "util.h" #include "mem.h" int main(int argc, char **argv) { lexicon_pt l=read_lexicon_file(argv[1]); char s[4000]; printf("Read %ld lexical entries.\n", (long int)hash_size(l->words)); while (fgets(s, 1000, stdin)) { word_pt w; int i, sl=strlen(s); for (sl--; sl>=0 && s[sl]=='\n'; sl--) { s[sl]='\0'; } w=hash_get(l->words, s); if (!w) { printf("No such word \"%s\".\n", s); continue; } printf("%s[%d,%s]:", s, w->defaulttag, tagname(l, w->defaulttag)); for (i=0; w->sorter[i]>0; i++) { printf("\t%s %d", (char *)array_get(l->tags, w->sorter[i]), w->tagcount[w->sorter[i]]); } printf("\n"); } /* Free the memory held by util.c. */ util_teardown(); }
#include "config.h" #include <stdio.h> #include <string.h> #include "lexicon.h" #include "hash.h" #include "array.h" #include "util.h" #include "mem.h" int main(int argc, char **argv) { lexicon_pt l=read_lexicon_file(argv[1]); char s[4000]; printf("Read %ld lexical entries.\n", (long int)hash_size(l->words)); while (fgets(s, 1000, stdin)) { word_pt w; int i, sl=strlen(s); for (sl--; sl>=0 && s[sl]=='\n'; sl--) { s[sl]='\0'; } w=hash_get(l->words, s); if (!w) { printf("No such word \"%s\".\n", s); continue; } printf("%s[%d,%s]:", s, w->defaulttag, tagname(l, w->defaulttag)); for (i=0; w->sorter[i]>0; i++) { printf("\t%s %d", (char *)array_get(l->tags, w->sorter[i]), w->tagcount[w->sorter[i]]); } printf("\n"); } /* Free the memory held by util.c. */ util_teardown(); return 0; }
Return 0 from main as it should.
Return 0 from main as it should.
C
bsd-3-clause
giuliopaci/acopost,giuliopaci/acopost,giuliopaci/acopost,giuliopaci/acopost
762f4e479e147e15cb8bed3fb0113e04279f87ae
lib/packet_queue.h
lib/packet_queue.h
#ifndef PACKET_QUEUE_H_INCLUDED__ #define PACKET_QUEUE_H_INCLUDED__ #include "radio.h" #include <stdbool.h> #define PACKET_QUEUE_SIZE 10 typedef struct { radio_packet_t * head; radio_packet_t * tail; radio_packet_t packets[PACKET_QUEUE_SIZE]; } packet_queue_t; uint32_t packet_queue_init(packet_queue_t * queue); bool packet_queue_is_empty(packet_queue_t * queue); bool packet_queue_is_full(packet_queue_t * queue); uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet); uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet); #endif
#ifndef PACKET_QUEUE_H_INCLUDED__ #define PACKET_QUEUE_H_INCLUDED__ #include "radio.h" #include <stdbool.h> #define PACKET_QUEUE_SIZE 10 typedef struct { uint32_t head; uint32_t tail; radio_packet_t packets[PACKET_QUEUE_SIZE]; } packet_queue_t; uint32_t packet_queue_init(packet_queue_t * queue); bool packet_queue_is_empty(packet_queue_t * queue); bool packet_queue_is_full(packet_queue_t * queue); uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet); uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet); #endif
Fix types of head and tail.
Fix types of head and tail.
C
bsd-3-clause
hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio
2b7eda48618299374655d85ed355973c93d82201
libavutil/random_seed.h
libavutil/random_seed.h
/* * Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com> * * This file is part of FFmpeg. * * FFmpeg 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. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVUTIL_RANDOM_SEED_H #define AVUTIL_RANDOM_SEED_H #include <stdint.h> /** * Gets a seed to use in conjuction with random functions. */ uint32_t ff_random_get_seed(void); #endif /* AVUTIL_RANDOM_SEED_H */
/* * Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com> * * This file is part of FFmpeg. * * FFmpeg 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. * * FFmpeg 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVUTIL_RANDOM_SEED_H #define AVUTIL_RANDOM_SEED_H #include <stdint.h> /** * Gets a seed to use in conjunction with random functions. */ uint32_t ff_random_get_seed(void); #endif /* AVUTIL_RANDOM_SEED_H */
Fix typo: 'conjuction' -> 'conjunction'.
Fix typo: 'conjuction' -> 'conjunction'. git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@17989 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
C
lgpl-2.1
prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg,prajnashi/ffmpeg
952aaca3d7c3be9da8487e6316721a802ab5261b
server/tests/stat-main.c
server/tests/stat-main.c
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2015 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>. */ /* check statistics */ #include <config.h> #include <glib.h> typedef void test_func_t(void); test_func_t stat_test1; test_func_t stat_test2; test_func_t stat_test3; test_func_t stat_test4; static test_func_t *test_funcs[] = { stat_test1, stat_test2, stat_test3, stat_test4, NULL }; int main(void) { test_func_t **func_p; for (func_p = test_funcs; *func_p; ++func_p) { (*func_p)(); } return 0; }
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2015 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>. */ /* check statistics */ #include <config.h> #include <glib.h> typedef void test_func_t(void); test_func_t stat_test1; test_func_t stat_test2; test_func_t stat_test3; test_func_t stat_test4; static test_func_t *test_funcs[] = { stat_test1, stat_test2, stat_test3, stat_test4, NULL }; int main(void) { test_func_t **func_p; for (func_p = test_funcs; *func_p; ++func_p) { (*func_p)(); } return 0; }
Remove empty line at EOF
syntax-check: Remove empty line at EOF Acked-by: Christophe Fergeau <05b95054a663c388a4e33d95828cb30f0370f8ef@redhat.com>
C
lgpl-2.1
fgouget/spice,SPICE/spice,fgouget/spice,fgouget/spice,SPICE/spice,SPICE/spice,fgouget/spice
96430e414762391ff89b48b6c63c0983ff11365f
source/udc/src/udc_libusbg.c
source/udc/src/udc_libusbg.c
/* * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd. * * 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. */ #include "udc.h" #include <stdlib.h> struct gt_udc_backend gt_udc_backend_libusbg = { .udc = NULL, };
/* * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd. * * 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. */ #include <stdio.h> #include <usbg/usbg.h> #include "backend.h" #include "udc.h" static int udc_func(void *data) { usbg_udc *u; const char *name; usbg_for_each_udc(u, backend_ctx.libusbg_state) { name = usbg_get_udc_name(u); if (name == NULL) { fprintf(stderr, "Error getting udc name\n"); return -1; } puts(name); } return 0; } struct gt_udc_backend gt_udc_backend_libusbg = { .udc = udc_func, };
Add gadget udc command at libusbg backend
udc: Add gadget udc command at libusbg backend Change-Id: If1510069df2e6cd2620c89576ebba80685cb07d7 Signed-off-by: Pawel Szewczyk <1691dcf8dab804b326e5e4b9ab228a1c3b23a2f2@samsung.com>
C
apache-2.0
kopasiak/gt,kopasiak/gt
2d4b83275dd0ce04a117a78e1eaca45d189c24f9
test/tsan/libdispatch/dispatch_once_deadlock.c
test/tsan/libdispatch/dispatch_once_deadlock.c
// Check that calling dispatch_once from a report callback works. // RUN: %clang_tsan %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s #include <dispatch/dispatch.h> #include <pthread.h> #include <stdio.h> long g = 0; long h = 0; void f() { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ g++; }); h++; } void __tsan_on_report() { fprintf(stderr, "Report.\n"); f(); } int main() { fprintf(stderr, "Hello world.\n"); f(); pthread_mutex_t mutex = {0}; pthread_mutex_lock(&mutex); fprintf(stderr, "g = %ld.\n", g); fprintf(stderr, "h = %ld.\n", h); fprintf(stderr, "Done.\n"); } // CHECK: Hello world. // CHECK: Report. // CHECK: g = 1 // CHECK: h = 2 // CHECK: Done.
// Check that calling dispatch_once from a report callback works. // RUN: %clang_tsan %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s #include <dispatch/dispatch.h> #include <pthread.h> #include <stdio.h> long g = 0; long h = 0; void f() { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ g++; }); h++; } void __tsan_on_report() { fprintf(stderr, "Report.\n"); f(); } int main() { fprintf(stderr, "Hello world.\n"); f(); pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_unlock(&mutex); // Unlock of an unlocked mutex fprintf(stderr, "g = %ld.\n", g); fprintf(stderr, "h = %ld.\n", h); fprintf(stderr, "Done.\n"); } // CHECK: Hello world. // CHECK: Report. // CHECK: g = 1 // CHECK: h = 2 // CHECK: Done.
Make test work on Linux, pt. 2
[TSan][libdispatch] Make test work on Linux, pt. 2 git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@357741 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
ed8496dd8db282150831412ba02fe27476877d1f
You-QueryEngine/internal/action/filter_task.h
You-QueryEngine/internal/action/filter_task.h
/// \file update_task.h /// Defines action for updating tasks. /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #define YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #include <functional> #include "../../filter.h" #include "../../api.h" namespace You { namespace QueryEngine { namespace Internal { namespace Action { /// Define action for updating task class FilterTask : public Query { public: /// Constructor explicit FilterTask(const Filter& filter) : filter(filter) {} /// Destructor virtual ~FilterTask() = default; private: /// Execute add task. Response execute(State& tasks) override; FilterTask& operator=(const FilterTask&) = delete; const Filter& filter; }; } // namespace Action } // namespace Internal } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
/// \file update_task.h /// Defines action for updating tasks. /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #define YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #include <functional> #include "../../filter.h" #include "../../api.h" namespace You { namespace QueryEngine { namespace Internal { namespace Action { /// Define action for updating task class FilterTask : public Query { public: /// Constructor explicit FilterTask(const Filter& filter) : filter(filter) {} /// Destructor virtual ~FilterTask() = default; private: /// Execute add task. Response execute(State& tasks) override; FilterTask& operator=(const FilterTask&) = delete; Filter filter; }; } // namespace Action } // namespace Internal } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
Store filter by value in FilterTask
Store filter by value in FilterTask
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
55cfa656096e17cb624643b292d479752eff9b84
myrrh/python/registry.h
myrrh/python/registry.h
/** @file Copyright John Reid 2013 */ #ifndef MYRRH_PYTHON_REGISTRY_H_ #define MYRRH_PYTHON_REGISTRY_H_ #ifdef _MSC_VER # pragma once #endif //_MSC_VER namespace myrrh { namespace python { /** * Queries if the the type specified is in the registry. */ template< typename QueryT > bool in_registry() { namespace bp = boost::python; bp::type_info info = boost::python::type_id< QueryT >(); bp::converter::registration * registration = boost::python::converter::registry::query( info ); return registration != 0; } } //namespace myrrh } //namespace python #endif //MYRRH_PYTHON_REGISTRY_H_
/** @file Copyright John Reid 2013 */ #ifndef MYRRH_PYTHON_REGISTRY_H_ #define MYRRH_PYTHON_REGISTRY_H_ #ifdef _MSC_VER # pragma once #endif //_MSC_VER namespace myrrh { namespace python { /** * Queries if the the type specified is in the registry. This can be used to avoid registering * the same type more than once. */ template< typename QueryT > const boost::python::converter::registration * get_registration() { namespace bp = boost::python; const bp::type_info info = boost::python::type_id< QueryT >(); const bp::converter::registration * registration = boost::python::converter::registry::query( info ); // need to check for m_to_python converter: see http://stackoverflow.com/a/13017303/959926 if( registration != 0 && registration->m_to_python != 0 ) { return registration; } else { return 0; } } } //namespace myrrh } //namespace python #endif //MYRRH_PYTHON_REGISTRY_H_
Fix for inner class registration check
Fix for inner class registration check
C
mit
JohnReid/myrrh,JohnReid/myrrh
2b1a93b1c435fa60ffe3011bfdd70f104bc34e93
alura/c/adivinhacao.c
alura/c/adivinhacao.c
#include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; printf("Qual é o seu chute? "); scanf("%d", &chute); printf("Seu chute foi %d\n", chute); int acertou = chute == numerosecreto; if(acertou) { printf("Parabéns! Você acertou!\n"); printf("Jogue de novo, você é um bom jogador!\n"); } else { int maior = chute > numerosecreto; if(maior) { printf("Seu chute foi maior que o número secreto\n"); } else { printf("Seu chute foi menor que o número secreto\n"); } printf("Você errou!\n"); printf("Mas não desanime, tente de novo!\n"); } }
#include <stdio.h> int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; for(int i = 1; i <= 3; i++) { printf("Tentativa %d de 3\n", i); printf("Qual é o seu chute? "); scanf("%d", &chute); printf("Seu chute foi %d\n", chute); int acertou = chute == numerosecreto; if(acertou) { printf("Parabéns! Você acertou!\n"); printf("Jogue de novo, você é um bom jogador!\n"); } else { int maior = chute > numerosecreto; if(maior) { printf("Seu chute foi maior que o número secreto\n"); } else { printf("Seu chute foi menor que o número secreto\n"); } printf("Você errou!\n"); printf("Mas não desanime, tente de novo!\n"); } } printf("Fim de jogo!\n"); }
Update files, Alura, Introdução a C, Aula 2.5
Update files, Alura, Introdução a C, Aula 2.5
C
mit
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
b6be5329bed253db517553152ee1f76e5ee68074
src/parse/stmt/equivalence.c
src/parse/stmt/equivalence.c
#include "../parse.h" unsigned parse_stmt_equivalence( const sparse_t* src, const char* ptr, parse_stmt_t* stmt) { unsigned i = parse_keyword( src, ptr, PARSE_KEYWORD_EQUIVALENCE); if (i == 0) return 0; stmt->type = PARSE_STMT_EQUIVALENCE; stmt->equivalence.count = 0; stmt->equivalence.group = NULL; unsigned len = parse_list(src, ptr, &stmt->equivalence.count, (void***)&stmt->equivalence.group, (void*)parse_lhs_list_bracketed, (void*)parse_lhs_list_delete); if (len == 0) return 0; i += len; return i; }
#include "../parse.h" unsigned parse_stmt_equivalence( const sparse_t* src, const char* ptr, parse_stmt_t* stmt) { unsigned i = parse_keyword( src, ptr, PARSE_KEYWORD_EQUIVALENCE); if (i == 0) return 0; stmt->type = PARSE_STMT_EQUIVALENCE; stmt->equivalence.count = 0; stmt->equivalence.group = NULL; unsigned len = parse_list(src, &ptr[i], &stmt->equivalence.count, (void***)&stmt->equivalence.group, (void*)parse_lhs_list_bracketed, (void*)parse_lhs_list_delete); if (len == 0) return 0; i += len; return i; }
Fix bug in EQUIVALENCE parsing
Fix bug in EQUIVALENCE parsing
C
apache-2.0
CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc
eae3d77193813825d7c4cb8dcb86d341c0b5b756
src/wrappers/themis/Obj-C/objcthemis/smessage.h
src/wrappers/themis/Obj-C/objcthemis/smessage.h
/* * Copyright (C) 2015 CossackLabs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import <Foundation/Foundation.h> #import <themis/themis.h> @interface SKeygen : NSObject { NSData* _priv_key; NSData* _pub_key; } - (id)init; - (NSData*)priv_key: error:(NSError**)errorPtr; - (NSData*)pub_key: error:(NSError**)errorPtr; @end
/* * Copyright (C) 2015 CossackLabs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import <Foundation/Foundation.h> #import <themis/themis.h> @interface SMessage : NSObject { NSMutableData* _priv_key; NSMutableData* _pub_key; } - (id)initWithPrivateKey: (NSData*)private_key peerPublicKey:(NSData*)peer_pub_key; - (NSData*)wrap: (NSData*)message error:(NSError**)errorPtr; - (NSData*)unwrap: (NSData*)message error:(NSError**)errorPtr; @end
Add some correction to Obj-C wrappers
Add some correction to Obj-C wrappers
C
apache-2.0
mnaza/themis,storojs72/themis,cossacklabs/themis,Lagovas/themis,storojs72/themis,mnaza/themis,storojs72/themis,cossacklabs/themis,Lagovas/themis,storojs72/themis,mnaza/themis,cossacklabs/themis,mnaza/themis,cossacklabs/themis,Lagovas/themis,Lagovas/themis,cossacklabs/themis,cossacklabs/themis,storojs72/themis,storojs72/themis,storojs72/themis,cossacklabs/themis,mnaza/themis,cossacklabs/themis,cossacklabs/themis,cossacklabs/themis,mnaza/themis,cossacklabs/themis,storojs72/themis,cossacklabs/themis,mnaza/themis,Lagovas/themis,Lagovas/themis,Lagovas/themis,mnaza/themis,Lagovas/themis,storojs72/themis,Lagovas/themis,mnaza/themis,cossacklabs/themis,storojs72/themis
a5ff559cf1182c4e86293784a64a52574eada1b4
printing/metafile_impl.h
printing/metafile_impl.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 PRINTING_METAFILE_IMPL_H_ #define PRINTING_METAFILE_IMPL_H_ #if defined(OS_WIN) #include "printing/emf_win.h" #elif defined(OS_MACOSX) #include "printing/pdf_metafile_cg_mac.h" #elif defined(OS_POSIX) #include "printing/pdf_metafile_cairo_linux.h" #endif #if !defined(OS_MACOSX) || defined(USE_SKIA) #include "printing/pdf_metafile_skia.h" #endif namespace printing { #if defined(OS_WIN) typedef Emf NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #elif defined(OS_MACOSX) #if defined(USE_SKIA) typedef PdfMetafileSkia NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #else typedef PdfMetafileCg NativeMetafile; typedef PdfMetafileCg PreviewMetafile; #endif #elif defined(OS_POSIX) typedef PdfMetafileCairo NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #endif } // namespace printing #endif // PRINTING_METAFILE_IMPL_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 PRINTING_METAFILE_IMPL_H_ #define PRINTING_METAFILE_IMPL_H_ #if defined(OS_WIN) #include "printing/emf_win.h" #elif defined(OS_MACOSX) #include "printing/pdf_metafile_cg_mac.h" #elif defined(OS_POSIX) #include "printing/pdf_metafile_cairo_linux.h" #endif #if !defined(OS_MACOSX) || defined(USE_SKIA) #include "printing/pdf_metafile_skia.h" #endif namespace printing { #if defined(OS_WIN) typedef Emf NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #elif defined(OS_MACOSX) #if defined(USE_SKIA) typedef PdfMetafileSkia NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #else typedef PdfMetafileCg NativeMetafile; typedef PdfMetafileCg PreviewMetafile; #endif #elif defined(OS_POSIX) typedef PdfMetafileSkia NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #endif } // namespace printing #endif // PRINTING_METAFILE_IMPL_H_
Switch the native print path on Linux and ChromeOS to use Skia instead of Cairo
Switch the native print path on Linux and ChromeOS to use Skia instead of Cairo BUG= TEST=Pages printed via cloud print to raster based printers should successfully print images. Review URL: http://codereview.chromium.org/7817007 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@99318 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,keishi/chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,M4sse/chromium.src,robclark/chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,littlstar/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,Just-D/chromium-1,keishi/chromium,hgl888/chromium-crosswalk,ondra-novak/chromium.src,robclark/chromium,ltilve/chromium,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,keishi/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,keishi/chromium,ltilve/chromium,chuan9/chromium-crosswalk,rogerwang/chromium,rogerwang/chromium,ltilve/chromium,markYoungH/chromium.src,nacl-webkit/chrome_deps,dushu1203/chromium.src,M4sse/chromium.src,hujiajie/pa-chromium,markYoungH/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,littlstar/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,rogerwang/chromium,Jonekee/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,rogerwang/chromium,chuan9/chromium-crosswalk,dushu1203/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,rogerwang/chromium,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,rogerwang/chromium,robclark/chromium,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Just-D/chromium-1,markYoungH/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,keishi/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,robclark/chromium,littlstar/chromium.src,markYoungH/chromium.src,ltilve/chromium,M4sse/chromium.src,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,robclark/chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,Chilledheart/chromium,Fireblend/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,dednal/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,ChromiumWebApps/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,jaruba/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,rogerwang/chromium,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,keishi/chromium,robclark/chromium,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,keishi/chromium,markYoungH/chromium.src,robclark/chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,junmin-zhu/chromium-rivertrail,dednal/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,jaruba/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,Fireblend/chromium-crosswalk,M4sse/chromium.src,timopulkkinen/BubbleFish,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,nacl-webkit/chrome_deps,keishi/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,dednal/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,patrickm/chromium.src,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,Jonekee/chromium.src,keishi/chromium,ondra-novak/chromium.src,littlstar/chromium.src,jaruba/chromium.src,robclark/chromium,Just-D/chromium-1,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,robclark/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,keishi/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,dednal/chromium.src,ltilve/chromium,anirudhSK/chromium,M4sse/chromium.src,dushu1203/chromium.src
86f04cd3f2d5c23f1745acdaa86ef526c174ce9a
aescpuid.c
aescpuid.c
/** * cpuid.c * * Checks if CPU has support of AES instructions * * @author kryukov@frtk.ru * @version 4.0 * * For Putty AES NI project * http://putty-aes-ni.googlecode.com/ */ #ifndef SILENT #include <stdio.h> #endif #if defined(__clang__) || defined(__GNUC__) #include <cpuid.h> static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(1, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #else /* defined(__clang__) || defined(__GNUC__) */ static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(CPUInfo, 1); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #endif /* defined(__clang__) || defined(__GNUC__) */ int main(int argc, char ** argv) { const int res = !CheckCPUsupportAES(); #ifndef SILENT printf("This CPU %s AES-NI\n", res ? "does not support" : "supports"); #endif return res; }
/** * cpuid.c * * Checks if CPU has support of AES instructions * * @author kryukov@frtk.ru * @version 4.0 * * For Putty AES NI project * http://putty-aes-ni.googlecode.com/ */ #include <stdio.h> #if defined(__clang__) || defined(__GNUC__) #include <cpuid.h> static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(1, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #else /* defined(__clang__) || defined(__GNUC__) */ static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(CPUInfo, 1); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #endif /* defined(__clang__) || defined(__GNUC__) */ int main(int argc, char ** argv) { const int res = !CheckCPUsupportAES(); printf("This CPU %s AES-NI\n", res ? "does not support" : "supports"); return res; }
Print CPUID result to output
Print CPUID result to output
C
mit
pavelkryukov/putty-aes-ni,pavelkryukov/putty-aes-ni
1e437be581a3d2e1176a66f4e2420ce7f37ead37
TRD/AliTRDPreprocessor.h
TRD/AliTRDPreprocessor.h
#ifndef ALI_TRD_PREPROCESSOR_H #define ALI_TRD_PREPROCESSOR_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ //////////////////////////////////////////////////////////////////////////// // // // TRD preprocessor for the database SHUTTLE // // // //////////////////////////////////////////////////////////////////////////// #include "AliPreprocessor.h" class AliTRDPreprocessor : public AliPreprocessor { public: AliTRDPreprocessor(AliShuttleInterface *shuttle); virtual ~AliTRDPreprocessor(); protected: virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime); virtual UInt_t Process(TMap* /*dcsAliasMap*/); private: ClassDef(AliTRDPreprocessor,0); }; #endif
#ifndef ALI_TRD_PREPROCESSOR_H #define ALI_TRD_PREPROCESSOR_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ //////////////////////////////////////////////////////////////////////////// // // // TRD preprocessor for the database SHUTTLE // // // //////////////////////////////////////////////////////////////////////////// #include "AliPreprocessor.h" class AliTRDPreprocessor : public AliPreprocessor { public: AliTRDPreprocessor(AliShuttleInterface *shuttle); virtual ~AliTRDPreprocessor(); protected: virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime); virtual UInt_t Process(TMap* /*dcsAliasMap*/); private: ClassDef(AliTRDPreprocessor,0) // The SHUTTLE preprocessor for TRD }; #endif
Add a comment behind ClassDef
Add a comment behind ClassDef
C
bsd-3-clause
ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,miranov25/AliRoot,shahor02/AliRoot,alisw/AliRoot,shahor02/AliRoot,shahor02/AliRoot,coppedis/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,coppedis/AliRoot,miranov25/AliRoot,shahor02/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,alisw/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,mkrzewic/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,sebaleh/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,mkrzewic/AliRoot
b7206937d9779b2e90ec28fe3ca42d00916eab14
osu.Framework/Resources/Shaders/sh_yuv2rgb.h
osu.Framework/Resources/Shaders/sh_yuv2rgb.h
uniform sampler2D m_SamplerY; uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; uniform mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { float y = texture2D(m_SamplerY, loc).r; float u = texture2D(m_SamplerU, loc).r; float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }
uniform sampler2D m_SamplerY; uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; uniform mediump mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { lowp float y = texture2D(m_SamplerY, loc).r; lowp float u = texture2D(m_SamplerU, loc).r; lowp float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }
Add precision prefixes to shaders
Add precision prefixes to shaders Co-Authored-By: Dan Balasescu <c9bd76907373126dff70d71f8b944159a669cbf1@smgi.me>
C
mit
ppy/osu-framework,ZLima12/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,ppy/osu-framework,ZLima12/osu-framework,smoogipooo/osu-framework,peppy/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,smoogipooo/osu-framework,EVAST9919/osu-framework,ppy/osu-framework
b59d8199e0a0a3d1c77cc36f3cfb1c6716a254a8
include/llvm/Transforms/IPO.h
include/llvm/Transforms/IPO.h
//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=// // // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H #define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H class Pass; Pass *createCleanupGCCOutputPass(); #endif
//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=// // // These passes are used to cleanup the output of GCC. GCC's output is // unneccessarily gross for a couple of reasons. This pass does the following // things to try to clean it up: // // * Eliminate names for GCC types that we know can't be needed by the user. // * Eliminate names for types that are unused in the entire translation unit // * Fix various problems that we might have in PHI nodes and casts // * Link uses of 'void %foo(...)' to 'void %foo(sometypes)' // // Note: This code produces dead declarations, it is a good idea to run DCE // after this pass. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H #define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H class Pass; // CleanupGCCOutputPass - Perform all of the function body transformations. // Pass *createCleanupGCCOutputPass(); // FunctionResolvingPass - Go over the functions that are in the module and // look for functions that have the same name. More often than not, there will // be things like: // void "foo"(...) // void "foo"(int, int) // because of the way things are declared in C. If this is the case, patch // things up. // // This is an interprocedural pass. // Pass *createFunctionResolvingPass(); #endif
Split the CleanupGCCOutput pass into two passes, and add real life actual documentation on when they do.
Split the CleanupGCCOutput pass into two passes, and add real life actual documentation on when they do. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2222 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm
56ecad6907dea785ebffba414dfe3ff586e5f2e0
src/shutdown/hpr_wall.c
src/shutdown/hpr_wall.c
/* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/posixishard.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; }
/* ISC license. */ #include <string.h> #include <utmpx.h> #include <skalibs/allreadwrite.h> #include <skalibs/strerr2.h> #include <skalibs/djbunix.h> #include <skalibs/posixishard.h> #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; }
Include posixishard as late as possible
Include posixishard as late as possible
C
isc
skarnet/s6-linux-init,skarnet/s6-linux-init
60da6bc748cf4366005a047a1ab2637184150333
gc_none.c
gc_none.c
#include "visibility.h" #include "objc/runtime.h" #include "gc_ops.h" #include "class.h" #include <stdlib.h> #include <stdio.h> static id allocate_class(Class cls, size_t extraBytes) { intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); return (id)(addr + 1); } static void free_object(id obj) { free((void*)(((intptr_t)obj) - 1)); } static void *alloc(size_t size) { return calloc(size, 1); } PRIVATE struct gc_ops gc_ops_none = { .allocate_class = allocate_class, .free_object = free_object, .malloc = alloc, .free = free }; PRIVATE struct gc_ops *gc = &gc_ops_none; PRIVATE BOOL isGCEnabled = NO; #ifndef ENABLE_GC PRIVATE void enableGC(BOOL exclusive) { fprintf(stderr, "Attempting to enable garbage collection, but your" "Objective-C runtime was built without garbage collection" "support\n"); abort(); } #endif
#include "visibility.h" #include "objc/runtime.h" #include "gc_ops.h" #include "class.h" #include <stdlib.h> #include <stdio.h> static id allocate_class(Class cls, size_t extraBytes) { intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); return (id)(addr + 1); } static void free_object(id obj) { free((void*)(((intptr_t*)obj) - 1)); } static void *alloc(size_t size) { return calloc(size, 1); } PRIVATE struct gc_ops gc_ops_none = { .allocate_class = allocate_class, .free_object = free_object, .malloc = alloc, .free = free }; PRIVATE struct gc_ops *gc = &gc_ops_none; PRIVATE BOOL isGCEnabled = NO; #ifndef ENABLE_GC PRIVATE void enableGC(BOOL exclusive) { fprintf(stderr, "Attempting to enable garbage collection, but your" "Objective-C runtime was built without garbage collection" "support\n"); abort(); } #endif
Fix bug spotted by Justin Hibbits.
Fix bug spotted by Justin Hibbits. git-svn-id: f6517e426f81db5247881cd92f7386583ace04fa@33751 72102866-910b-0410-8b05-ffd578937521
C
mit
crontab/libobjc2,skudryas/gnustep-libobjc2,skudryas/gnustep-libobjc2,crontab/libobjc2
315c996e6e6fac57514d4faa73329060edf714dc
libechonest/src/ENAPI_utils.h
libechonest/src/ENAPI_utils.h
// // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
// // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } #define CHECK_OAUTH_KEYS if (nil == [ENAPI consumerKey] && nil == [ENAPI sharedSecret]) { @throw [NSException exceptionWithName:@"OAuthKeysNotSetException" reason:@"Set the consumer key & shared secret before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/";
Add macro for checking OAuth keys.
Add macro for checking OAuth keys.
C
bsd-3-clause
echonest/libechonest
08d8a5ec7d018c771787bd33b429c2b2d096a578
AAChartKit/ChartsDemo/SecondViewController.h
AAChartKit/ChartsDemo/SecondViewController.h
// // ViewController.h // AAChartKit // // Created by An An on 17/3/13. // Copyright © 2017年 An An. All rights reserved. // source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger,ENUM_secondeViewController_chartType){ ENUM_secondeViewController_chartTypeColumn =0, ENUM_secondeViewController_chartTypeBar, ENUM_secondeViewController_chartTypeArea, ENUM_secondeViewController_chartTypeAreaspline, ENUM_secondeViewController_chartTypeLine, ENUM_secondeViewController_chartTypeSpline, ENUM_secondeViewController_chartTypeScatter, }; @interface SecondViewController : UIViewController @property(nonatomic,assign)NSInteger ENUM_secondeViewController_chartType; @property(nonatomic,copy)NSString *receivedChartType; @end
// // ViewController.h // AAChartKit // // Created by An An on 17/3/13. // Copyright © 2017年 An An. All rights reserved. // source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger,SecondeViewControllerChartType){ SecondeViewControllerChartTypeColumn =0, SecondeViewControllerChartTypeBar, SecondeViewControllerChartTypeArea, SecondeViewControllerChartTypeAreaspline, SecondeViewControllerChartTypeLine, SecondeViewControllerChartTypeSpline, SecondeViewControllerChartTypeScatter, }; @interface SecondViewController : UIViewController @property(nonatomic,assign)NSInteger SecondeViewControllerChartType; @property(nonatomic,copy)NSString *receivedChartType; @end
Correct the naming notations of enumeration
Correct the naming notations of enumeration
C
mit
AAChartModel/AAChartKit,AAChartModel/AAChartKit,AAChartModel/AAChartKit
ad42bb9a0b167e38bd2fef333c1d725bc41f0dc0
src/media/tagreader.h
src/media/tagreader.h
#ifndef TAGREADER_H #define TAGREADER_H #include <taglib/fileref.h> #include <taglib/tag.h> #include <taglib/mpegfile.h> #include <taglib/id3v2tag.h> #include <taglib/attachedpictureframe.h> #include <QString> #include <QImage> class TagReader { public: TagReader(const QString &file); ~TagReader(); bool isValid() const; bool hasAudioProperties() const; QString title() const; QString album() const; QString artist() const; int track() const; int year() const; QString genre() const; QString comment() const; int length() const; int bitrate() const; int sampleRate() const; int channels() const; QImage thumbnailImage() const; QByteArray thumbnail() const; private: TagLib::FileRef m_fileRef; TagLib::Tag *m_tag; TagLib::AudioProperties *m_audioProperties; }; #endif // TAGREADER_H
#ifndef TAGREADER_H #define TAGREADER_H #include "taglib/fileref.h" #include "taglib/tag.h" #include "taglib/mpeg/mpegfile.h" #include "taglib/mpeg/id3v2/id3v2tag.h" #include "taglib/mpeg/id3v2/frames/attachedpictureframe.h" #include <QString> #include <QImage> class TagReader { public: TagReader(const QString &file); ~TagReader(); bool isValid() const; bool hasAudioProperties() const; QString title() const; QString album() const; QString artist() const; int track() const; int year() const; QString genre() const; QString comment() const; int length() const; int bitrate() const; int sampleRate() const; int channels() const; QImage thumbnailImage() const; QByteArray thumbnail() const; private: TagLib::FileRef m_fileRef; TagLib::Tag *m_tag; TagLib::AudioProperties *m_audioProperties; }; #endif // TAGREADER_H
Use our package taglib headers and not the hosts!
Use our package taglib headers and not the hosts!
C
bsd-3-clause
qtmediahub/sasquatch,qtmediahub/sasquatch,qtmediahub/sasquatch
4ad6e5a49c4894661fabd40382f2482dd8011ac0
test2/structs/lvalue/cant.c
test2/structs/lvalue/cant.c
// RUN: %check -e %s main() { struct A { int i; } a, b, c; a = b ? : c; // CHECK: error: struct involved in if-expr }
// RUN: %check -e %s main() { struct A { int i; } a, b, c; a = b ? : c; // CHECK: error: struct involved in ?: }
Fix struct if-expression test warning
Fix struct if-expression test warning
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
d5e1c63c19ff5d4b8dd74bd4b16500becd869322
command_mode.c
command_mode.c
#include "mode.h" #include <stdlib.h> #include <string.h> #include <termbox.h> #include "buf.h" #include "editor.h" // TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing. static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) { char ch; switch (ev->key) { case TB_KEY_ESC: buf_printf(editor->status, ""); editor->mode = normal_mode(); return; case TB_KEY_BACKSPACE2: buf_delete(editor->status, editor->status->len - 1, 1); if (editor->status->len == 0) { editor->mode = normal_mode(); return; } return; case TB_KEY_ENTER: { char *command = strdup(editor->status->buf + 1); editor_execute_command(editor, command); free(command); editor->mode = normal_mode(); return; } case TB_KEY_SPACE: ch = ' '; break; default: ch = ev->ch; } char s[2] = {ch, '\0'}; buf_append(editor->status, s); } static editing_mode_t impl = {command_mode_key_pressed}; editing_mode_t *command_mode(void) { return &impl; }
#include "mode.h" #include <stdlib.h> #include <string.h> #include <termbox.h> #include "buf.h" #include "editor.h" // TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing. static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) { char ch; switch (ev->key) { case TB_KEY_ESC: buf_printf(editor->status, ""); editor->mode = normal_mode(); return; case TB_KEY_BACKSPACE2: buf_delete(editor->status, editor->status->len - 1, 1); if (editor->status->len == 0) { editor->mode = normal_mode(); return; } return; case TB_KEY_ENTER: { if (editor->status->len > 1) { char *command = strdup(editor->status->buf + 1); editor_execute_command(editor, command); free(command); } editor->mode = normal_mode(); return; } case TB_KEY_SPACE: ch = ' '; break; default: ch = ev->ch; } char s[2] = {ch, '\0'}; buf_append(editor->status, s); } static editing_mode_t impl = {command_mode_key_pressed}; editing_mode_t *command_mode(void) { return &impl; }
Fix segfault on empty : command.
Fix segfault on empty : command.
C
mit
isbadawi/badavi
1b7032c1539b38a4e6af2688bedf25ddf3450333
test/performance/clock.h
test/performance/clock.h
// A currentTime function for use in the tests. #ifdef _WIN32 extern "C" bool QueryPerformanceCounter(uint64_t *); extern "C" bool QueryPerformanceFrequency(uint64_t *); double currentTime() { uint64_t t, freq; QueryPerformanceCounter(&t); QueryPerformanceFrequency(&freq); return (t * 1000.0) / freq; } #else #include <sys/time.h> double currentTime() { static bool first_call = true; static timeval reference_time; if (first_call) { first_call = false; gettimeofday(&reference_time, NULL); return 0.0; } else { timeval t; gettimeofday(&t, NULL); return ((t.tv_sec - reference_time.tv_sec)*1000.0 + (t.tv_usec - reference_time.tv_usec)/1000.0); } } #endif
// A currentTime function for use in the tests. // Returns time in milliseconds. #ifdef _WIN32 extern "C" bool QueryPerformanceCounter(uint64_t *); extern "C" bool QueryPerformanceFrequency(uint64_t *); double currentTime() { uint64_t t, freq; QueryPerformanceCounter(&t); QueryPerformanceFrequency(&freq); return (t * 1000.0) / freq; } #else #include <sys/time.h> double currentTime() { static bool first_call = true; static timeval reference_time; if (first_call) { first_call = false; gettimeofday(&reference_time, NULL); return 0.0; } else { timeval t; gettimeofday(&t, NULL); return ((t.tv_sec - reference_time.tv_sec)*1000.0 + (t.tv_usec - reference_time.tv_usec)/1000.0); } } #endif
Add a comment that currentTime returns result in milliseconds.
Add a comment that currentTime returns result in milliseconds. Former-commit-id: 397c814dcee2df63ded6cbf17b63b601a10984e2
C
mit
darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide
f811db9dd6a03c198717b68afd00eb56200e19bc
src/lcd.c
src/lcd.c
/* COR:a.bc PE:a.bc BAC:a.bc */ void lcd_voltage() { string top, bottom; sprintf(top, "COR:%1.2f PE:%1.2f", nImmediateBatteryLevel * 0.001, SensorValue(PowerExpanderBattery) / 280); sprintf(bottom, "BAC:%1.2f", BackupBatteryLevel * 0.001); displayLCDString(LCD_LINE_TOP, 0, top); displayLCDString(LCD_LINE_BOTTOM, 0, bottom); } void lcd_clear() { clearLCDLine(LCD_LINE_TOP); clearLCDLine(LCD_LINE_BOTTOM); }
/* COR:a.bc PE:a.bc BAC:a.bc */ void lcd_voltage() { string top, bottom; sprintf(top, "COR:%1.2f PE:%1.2f", nImmediateBatteryLevel * 0.001, SensorValue(PowerExpanderBattery) / 280.0); sprintf(bottom, "BAC:%1.2f", BackupBatteryLevel * 0.001); displayLCDString(LCD_LINE_TOP, 0, top); displayLCDString(LCD_LINE_BOTTOM, 0, bottom); } void lcd_clear() { clearLCDLine(LCD_LINE_TOP); clearLCDLine(LCD_LINE_BOTTOM); }
Change power expander to float
Change power expander to float
C
mit
qsctr/vex-4194b-2016
0c7a489e65b7bc51cc15af88197eb162f54cff13
JazzHands/IFTTTAnimator.h
JazzHands/IFTTTAnimator.h
// // IFTTTAnimator.h // JazzHands // // Created by Devin Foley on 9/28/13. // Copyright (c) 2013 IFTTT Inc. All rights reserved. // @protocol IFTTTAnimatable; @interface IFTTTAnimator : NSObject - (void)addAnimation:(id<IFTTTAnimatable>)animation; - (void)animate:(CGFloat)time; @end
// // IFTTTAnimator.h // JazzHands // // Created by Devin Foley on 9/28/13. // Copyright (c) 2013 IFTTT Inc. All rights reserved. // #import <UIKit/UIKit.h> @protocol IFTTTAnimatable; @interface IFTTTAnimator : NSObject - (void)addAnimation:(id<IFTTTAnimatable>)animation; - (void)animate:(CGFloat)time; @end
Add UIKit import to allow for compiling without precompiled header
Add UIKit import to allow for compiling without precompiled header
C
mit
IFTTT/JazzHands,revolter/JazzHands,IFTTT/JazzHands,AlexanderMazaletskiy/JazzHands,ernestopino/JazzHands,ernestopino/JazzHands,lionkon/JazzHands,liuruxian/JazzHands,zorroblue/JazzHands,revolter/JazzHands,AlexanderMazaletskiy/JazzHands,wintersweet/JazzHands,ramoslin02/JazzHands,tangwei6423471/JazzHands,wintersweet/JazzHands,IFTTT/JazzHands,lionkon/JazzHands,lionkon/JazzHands,marcelofariasantos/JazzHands,tangwei6423471/JazzHands,marcelofariasantos/JazzHands,liuruxian/JazzHands,marcelofariasantos/JazzHands,liuruxian/JazzHands,wintersweet/JazzHands,AlexanderMazaletskiy/JazzHands,ernestopino/JazzHands,revolter/JazzHands,ramoslin02/JazzHands,liuruxian/JazzHands,zorroblue/JazzHands,tangwei6423471/JazzHands,zorroblue/JazzHands,tangwei6423471/JazzHands,ramoslin02/JazzHands,liuruxian/JazzHands,tangwei6423471/JazzHands
7f6be0874b9900c0188d7319412521f341dcf648
Classes/Constants.h
Classes/Constants.h
/* * Constants.h * phonegap-mac * * Created by shazron on 10-04-08. * Copyright 2010 Nitobi Software Inc. All rights reserved. * */ #define kStartPage @"index.html" //Sencha Demos #define kStartFolder @"www/sencha" // PhoneGap Docs Only //#define kStartFolder @"www/phonegap-docs/template/phonegap/"
/* * Constants.h * phonegap-mac * * Created by shazron on 10-04-08. * Copyright 2010 Nitobi Software Inc. All rights reserved. * */ #define kStartPage @"index.html" //Sencha Demos //#define kStartFolder @"www/sencha" // PhoneGap Docs Only #define kStartFolder @"www/phonegap-docs/template/phonegap/"
Revert "kStartFolder switch back to Sencha configuration"
Revert "kStartFolder switch back to Sencha configuration" This reverts commit 034cbb7f82a7c034ac8fe83c991ed6838b9a03b2.
C
apache-2.0
adobe-rnd/cordova-osx,apache/cordova-osx,adobe-rnd/cordova-osx,gitterHQ/cordova-osx,apache/cordova-osx,gitterHQ/cordova-osx,Jigsaw-Code/cordova-osx,adobe-rnd/cordova-osx,adobe-rnd/cordova-osx,onflapp/cordova-osx,adobe-rnd/cordova-osx,apache/cordova-osx,tripodsan/cordova-osx,Jigsaw-Code/cordova-osx,apache/cordova-osx,gitterHQ/cordova-osx,onflapp/cordova-osx,apache/cordova-osx,Jigsaw-Code/cordova-osx,tripodsan/cordova-osx,onflapp/cordova-osx,tripodsan/cordova-osx,Jigsaw-Code/cordova-osx,gitterHQ/cordova-osx,onflapp/cordova-osx,tripodsan/cordova-osx,onflapp/cordova-osx,tripodsan/cordova-osx,Jigsaw-Code/cordova-osx
59c91c8d0000af8f8a1022ee0f0eec46c397b347
include/clang/AST/CommentBriefParser.h
include/clang/AST/CommentBriefParser.h
//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines a very simple Doxygen comment parser. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #define LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #include "clang/AST/CommentLexer.h" namespace clang { namespace comments { /// A very simple comment parser that extracts "a brief description". /// /// Due to a variety of comment styles, it considers the following as "a brief /// description", in order of priority: /// \li a \\brief or \\short command, /// \li the first paragraph, /// \li a \\result or \\return or \\returns paragraph. class BriefParser { Lexer &L; const CommandTraits &Traits; /// Current lookahead token. Token Tok; SourceLocation ConsumeToken() { SourceLocation Loc = Tok.getLocation(); L.lex(Tok); return Loc; } public: BriefParser(Lexer &L, const CommandTraits &Traits); /// Return \\brief paragraph, if it exists; otherwise return the first /// paragraph. std::string Parse(); }; } // end namespace comments } // end namespace clang #endif
//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines a very simple Doxygen comment parser. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #define LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #include "clang/AST/CommentLexer.h" namespace clang { namespace comments { /// A very simple comment parser that extracts "a brief description". /// /// Due to a variety of comment styles, it considers the following as "a brief /// description", in order of priority: /// \li a \\brief or \\short command, /// \li the first paragraph, /// \li a \\result or \\return or \\returns paragraph. class BriefParser { Lexer &L; const CommandTraits &Traits; /// Current lookahead token. Token Tok; SourceLocation ConsumeToken() { SourceLocation Loc = Tok.getLocation(); L.lex(Tok); return Loc; } public: BriefParser(Lexer &L, const CommandTraits &Traits); /// Return the best "brief description" we can find. std::string Parse(); }; } // end namespace comments } // end namespace clang #endif
Update comment to match the reality.
Update comment to match the reality. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@162316 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
9137574e4d330370df242a0fa6c914f2f0eb5528
features/mbedtls/platform/inc/platform_mbed.h
features/mbedtls/platform/inc/platform_mbed.h
/** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(DEVICE_CRYPTO) #include "mbedtls_device.h" #endif
/** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(MBEDTLS_HW_SUPPORT) #include "mbedtls_device.h" #endif
Move mbed TLS configuration symbol to macro section
Move mbed TLS configuration symbol to macro section The configuration option for the mbed TLS specific hardware acceleration has to be in the macro section and not in the device capabilities section in targets.json. The option has also been renamed to better reflect its function.
C
apache-2.0
netzimme/mbed-os,nRFMesh/mbed-os,screamerbg/mbed,monkiineko/mbed-os,kl-cruz/mbed-os,screamerbg/mbed,nvlsianpu/mbed,ryankurte/mbed-os,mmorenobarm/mbed-os,screamerbg/mbed,netzimme/mbed-os,bcostm/mbed-os,fanghuaqi/mbed,adustm/mbed,NXPmicro/mbed,ryankurte/mbed-os,andcor02/mbed-os,infinnovation/mbed-os,CalSol/mbed,adamgreen/mbed,CalSol/mbed,arostm/mbed-os,NXPmicro/mbed,radhika-raghavendran/mbed-os5.1-onsemi,bcostm/mbed-os,mbedmicro/mbed,c1728p9/mbed-os,adamgreen/mbed,betzw/mbed-os,catiedev/mbed-os,catiedev/mbed-os,andcor02/mbed-os,arostm/mbed-os,ryankurte/mbed-os,j-greffe/mbed-os,svogl/mbed-os,maximmbed/mbed,pradeep-gr/mbed-os5-onsemi,nRFMesh/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,Archcady/mbed-os,CalSol/mbed,cvtsi2sd/mbed-os,NXPmicro/mbed,kl-cruz/mbed-os,nvlsianpu/mbed,mikaleppanen/mbed-os,fanghuaqi/mbed,kjbracey-arm/mbed,cvtsi2sd/mbed-os,mmorenobarm/mbed-os,YarivCol/mbed-os,CalSol/mbed,adamgreen/mbed,mikaleppanen/mbed-os,betzw/mbed-os,c1728p9/mbed-os,maximmbed/mbed,pradeep-gr/mbed-os5-onsemi,j-greffe/mbed-os,c1728p9/mbed-os,ryankurte/mbed-os,fahhem/mbed-os,mbedmicro/mbed,fahhem/mbed-os,bcostm/mbed-os,catiedev/mbed-os,Archcady/mbed-os,mbedmicro/mbed,radhika-raghavendran/mbed-os5.1-onsemi,c1728p9/mbed-os,infinnovation/mbed-os,nvlsianpu/mbed,bulislaw/mbed-os,nRFMesh/mbed-os,netzimme/mbed-os,nRFMesh/mbed-os,adustm/mbed,theotherjimmy/mbed,HeadsUpDisplayInc/mbed,screamerbg/mbed,cvtsi2sd/mbed-os,arostm/mbed-os,svogl/mbed-os,c1728p9/mbed-os,netzimme/mbed-os,RonEld/mbed,mazimkhan/mbed-os,bulislaw/mbed-os,fanghuaqi/mbed,kjbracey-arm/mbed,nRFMesh/mbed-os,HeadsUpDisplayInc/mbed,infinnovation/mbed-os,CalSol/mbed,RonEld/mbed,kl-cruz/mbed-os,mikaleppanen/mbed-os,Archcady/mbed-os,adustm/mbed,adamgreen/mbed,arostm/mbed-os,netzimme/mbed-os,catiedev/mbed-os,YarivCol/mbed-os,svogl/mbed-os,theotherjimmy/mbed,mmorenobarm/mbed-os,RonEld/mbed,YarivCol/mbed-os,RonEld/mbed,nRFMesh/mbed-os,karsev/mbed-os,YarivCol/mbed-os,netzimme/mbed-os,mazimkhan/mbed-os,monkiineko/mbed-os,mikaleppanen/mbed-os,bulislaw/mbed-os,karsev/mbed-os,nvlsianpu/mbed,adamgreen/mbed,infinnovation/mbed-os,nvlsianpu/mbed,arostm/mbed-os,andcor02/mbed-os,karsev/mbed-os,YarivCol/mbed-os,bcostm/mbed-os,theotherjimmy/mbed,mbedmicro/mbed,fahhem/mbed-os,CalSol/mbed,maximmbed/mbed,HeadsUpDisplayInc/mbed,HeadsUpDisplayInc/mbed,fahhem/mbed-os,mmorenobarm/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,svogl/mbed-os,catiedev/mbed-os,bcostm/mbed-os,svogl/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,cvtsi2sd/mbed-os,kjbracey-arm/mbed,j-greffe/mbed-os,adamgreen/mbed,monkiineko/mbed-os,mmorenobarm/mbed-os,catiedev/mbed-os,adustm/mbed,Archcady/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,theotherjimmy/mbed,j-greffe/mbed-os,pradeep-gr/mbed-os5-onsemi,monkiineko/mbed-os,bulislaw/mbed-os,adustm/mbed,mazimkhan/mbed-os,theotherjimmy/mbed,betzw/mbed-os,pradeep-gr/mbed-os5-onsemi,monkiineko/mbed-os,mbedmicro/mbed,cvtsi2sd/mbed-os,maximmbed/mbed,maximmbed/mbed,mikaleppanen/mbed-os,infinnovation/mbed-os,j-greffe/mbed-os,andcor02/mbed-os,fahhem/mbed-os,karsev/mbed-os,betzw/mbed-os,mikaleppanen/mbed-os,fanghuaqi/mbed,mazimkhan/mbed-os,pradeep-gr/mbed-os5-onsemi,karsev/mbed-os,ryankurte/mbed-os,mmorenobarm/mbed-os,mazimkhan/mbed-os,RonEld/mbed,monkiineko/mbed-os,infinnovation/mbed-os,ryankurte/mbed-os,NXPmicro/mbed,maximmbed/mbed,andcor02/mbed-os,RonEld/mbed,arostm/mbed-os,mazimkhan/mbed-os,NXPmicro/mbed,karsev/mbed-os,betzw/mbed-os,pradeep-gr/mbed-os5-onsemi,Archcady/mbed-os,kl-cruz/mbed-os,cvtsi2sd/mbed-os,andcor02/mbed-os,bulislaw/mbed-os,YarivCol/mbed-os,betzw/mbed-os,HeadsUpDisplayInc/mbed,fahhem/mbed-os,kl-cruz/mbed-os,svogl/mbed-os,c1728p9/mbed-os,Archcady/mbed-os,NXPmicro/mbed,HeadsUpDisplayInc/mbed,theotherjimmy/mbed,nvlsianpu/mbed,bcostm/mbed-os,fanghuaqi/mbed,bulislaw/mbed-os,kjbracey-arm/mbed,j-greffe/mbed-os,kl-cruz/mbed-os,screamerbg/mbed,adustm/mbed,screamerbg/mbed
dcbb118c40a472014ca77bf3f63afc35651657cc
inc/area.h
inc/area.h
#ifndef AREA_H #define AREA_H #include "base.h" typedef struct area area; struct area{ char name[10]; int capacity; int areasAround; char ** adjec; // STRINGS SIZE ARE ALWAYS 10 }; void listAreas(area * a, int size); void addArea(area * a, int size); void deleteArea(area * a, int size); #endif
#ifndef AREA_H #define AREA_H #include "base.h" typedef struct area area; struct area{ char name[10]; int capacity; int areasAround; char ** adjec; // STRINGS SIZE ARE ALWAYS 10 }; void listAreas(area * a, int size); void addArea(area ** a, int *size); void deleteArea(area ** a, int *size); int checkAreaExist(area * z, int zSize, char * areaName); int getAreaCapacity(area * z, int zSize, char * areaName); #endif
Add Area capacity functions. Add addArea function
Add Area capacity functions. Add addArea function
C
mit
leovegetium/Trabalho-P
941075e6a69846082231e76aca8642d299c2093c
polygon.h
polygon.h
#ifndef _POLYGON_H_ #define _POLYGON_H_ /* * geometric properties of the polygon meant for solving * * The default C pre-processor configuration here is to solve triangles. */ #define POLYGON_DEPTH 3 #if (POLYGON_DEPTH < 3) #error You cannot have a polygon with fewer than 3 sides! #endif #if (POLYGON_DEPTH > 'Z' - 'A') #error Angle labels are currently lettered. Sorry for this limitation. #endif /* * All polygons have a fixed limit to the total measure of their angles. * For example, the angles of a triangle always sum up to 180 degrees. */ #define INTERIOR_DEGREES (180 * ((POLYGON_DEPTH) - 2)) /* * Geometric lengths cannot be negative or zero. * We will reserve non-positive measures to indicate un-solved "unknowns". */ #define KNOWN(measure) ((measure) > 0) extern int solve_polygon(double * angles, double * sides); extern int already_solved(double * angels, double * sides); extern int find_angle(double * angles); extern int find_side(double * sides, const double * angles); extern int arc_find_angles(double * angles, const double * sides); #endif
#ifndef _POLYGON_H_ #define _POLYGON_H_ /* * geometric properties of the polygon meant for solving * * The default C pre-processor configuration here is to solve triangles. */ #ifndef POLYGON_DEPTH #define POLYGON_DEPTH 3 #endif #if (POLYGON_DEPTH < 3) #error You cannot have a polygon with fewer than 3 sides! #endif #if (POLYGON_DEPTH > 'Z' - 'A') #error Angle labels are currently lettered. Sorry for this limitation. #endif /* * All polygons have a fixed limit to the total measure of their angles. * For example, the angles of a triangle always sum up to 180 degrees. */ #define INTERIOR_DEGREES (180 * ((POLYGON_DEPTH) - 2)) /* * Geometric lengths cannot be negative or zero. * We will reserve non-positive measures to indicate un-solved "unknowns". */ #define KNOWN(measure) ((measure) > 0) extern int solve_polygon(double * angles, double * sides); extern int already_solved(double * angels, double * sides); extern int find_angle(double * angles); extern int find_side(double * sides, const double * angles); extern int arc_find_angles(double * angles, const double * sides); #endif
Allow POLYGON_DEPTH to be configurable by compile commands.
Allow POLYGON_DEPTH to be configurable by compile commands.
C
cc0-1.0
cxd4/trig,cxd4/trig
6e2253071014ec086daa6e1ad4c10d955617e5a5
ASN1Decoder/ASN1Decoder.h
ASN1Decoder/ASN1Decoder.h
// // ASN1Decoder.h // ASN1Decoder // // Created by Filippo Maguolo on 8/29/17. // Copyright © 2017 Filippo Maguolo. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for ASN1Decoder. FOUNDATION_EXPORT double ASN1DecoderVersionNumber; //! Project version string for ASN1Decoder. FOUNDATION_EXPORT const unsigned char ASN1DecoderVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <ASN1Decoder/PublicHeader.h>
// // ASN1Decoder.h // ASN1Decoder // // Created by Filippo Maguolo on 8/29/17. // Copyright © 2017 Filippo Maguolo. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for ASN1Decoder. FOUNDATION_EXPORT double ASN1DecoderVersionNumber; //! Project version string for ASN1Decoder. FOUNDATION_EXPORT const unsigned char ASN1DecoderVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <ASN1Decoder/PublicHeader.h>
Remove double whitespace on header file
Remove double whitespace on header file
C
mit
filom/ASN1Decoder,filom/ASN1Decoder
e667a7e04b163eef4461e72246e8effd7be8f9fa
include/arch/x86/arch/machine/cpu_registers.h
include/arch/x86/arch/machine/cpu_registers.h
/* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) */ #ifndef __ARCH_MACHINE_CPU_REGISTERS_H #define __ARCH_MACHINE_CPU_REGISTERS_H #define CR0_MONITOR_COPROC BIT(1) /* Trap on FPU "WAIT" commands. */ #define CR0_EMULATION BIT(2) /* Enable OS emulation of FPU. */ #define CR0_TASK_SWITCH BIT(3) /* Trap on any FPU usage, for lazy FPU. */ #define CR0_NUMERIC_ERROR BIT(5) /* Internally handle FPU problems. */ #define CR4_OSFXSR BIT(9) /* Enable SSE et. al. features. */ #define CR4_OSXMMEXCPT BIT(10) /* Enable SSE exceptions. */ /* We use a dummy variable to synchronize reads and writes to the control registers. * this allows us to write inline asm blocks that do not have enforced memory * clobbers for ordering. */ static unsigned long control_reg_order; #include <mode/machine/cpu_registers.h> #endif
/* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) */ #ifndef __ARCH_MACHINE_CPU_REGISTERS_H #define __ARCH_MACHINE_CPU_REGISTERS_H #define CR0_MONITOR_COPROC BIT(1) /* Trap on FPU "WAIT" commands. */ #define CR0_EMULATION BIT(2) /* Enable OS emulation of FPU. */ #define CR0_TASK_SWITCH BIT(3) /* Trap on any FPU usage, for lazy FPU. */ #define CR0_NUMERIC_ERROR BIT(5) /* Internally handle FPU problems. */ #define CR4_OSFXSR BIT(9) /* Enable SSE et. al. features. */ #define CR4_OSXMMEXCPT BIT(10) /* Enable SSE exceptions. */ #define CR4_OSXSAVE BIT(18) /* Enavle XSAVE feature set */ /* We use a dummy variable to synchronize reads and writes to the control registers. * this allows us to write inline asm blocks that do not have enforced memory * clobbers for ordering. */ static unsigned long control_reg_order; #include <mode/machine/cpu_registers.h> #endif
Add missing CR4 bit definition
x86: Add missing CR4 bit definition
C
bsd-2-clause
cmr/seL4,cmr/seL4,cmr/seL4
358d98c9444ba6a7b181506220ef3ecddc4e7f04
CWStatusBarNotification/CWStatusBarNotification.h
CWStatusBarNotification/CWStatusBarNotification.h
// // CWStatusBarNotification // CWNotificationDemo // // Created by Cezary Wojcik on 11/15/13. // Copyright (c) 2013 Cezary Wojcik. All rights reserved. // #import <Foundation/Foundation.h> @interface CWStatusBarNotification : NSObject enum { CWNotificationStyleStatusBarNotification, CWNotificationStyleNavigationBarNotification }; enum { CWNotificationAnimationStyleTop, CWNotificationAnimationStyleBottom, CWNotificationAnimationStyleLeft, CWNotificationAnimationStyleRight }; @property (strong, nonatomic) UIColor *notificationLabelBackgroundColor; @property (strong, nonatomic) UIColor *notificationLabelTextColor; @property (nonatomic) NSInteger notificationStyle; @property (nonatomic) NSInteger notificationAnimationInStyle; @property (nonatomic) NSInteger notificationAnimationOutStyle; @property (nonatomic) BOOL notificationIsShowing; - (void)displayNotificationWithMessage:(NSString *)message forDuration:(CGFloat)duration; - (void)displayNotificationWithMessage:(NSString *)message completion:(void (^)(void))completion; - (void)dismissNotification; @end
// // CWStatusBarNotification // CWNotificationDemo // // Created by Cezary Wojcik on 11/15/13. // Copyright (c) 2013 Cezary Wojcik. All rights reserved. // #import <Foundation/Foundation.h> @interface CWStatusBarNotification : NSObject typedef NS_ENUM(NSInteger, CWNotificationStyle){ CWNotificationStyleStatusBarNotification, CWNotificationStyleNavigationBarNotification }; typedef NS_ENUM(NSInteger, CWNotificationAnimationStyle) { CWNotificationAnimationStyleTop, CWNotificationAnimationStyleBottom, CWNotificationAnimationStyleLeft, CWNotificationAnimationStyleRight }; @property (strong, nonatomic) UIColor *notificationLabelBackgroundColor; @property (strong, nonatomic) UIColor *notificationLabelTextColor; @property (nonatomic) CWNotificationStyle notificationStyle; @property (nonatomic) CWNotificationAnimationStyle notificationAnimationInStyle; @property (nonatomic) CWNotificationAnimationStyle notificationAnimationOutStyle; @property (nonatomic) BOOL notificationIsShowing; - (void)displayNotificationWithMessage:(NSString *)message forDuration:(CGFloat)duration; - (void)displayNotificationWithMessage:(NSString *)message completion:(void (^)(void))completion; - (void)dismissNotification; @end
Make types for enums, add types to properties
Make types for enums, add types to properties
C
mit
kazmasaurus/CRToast,maranik/CRToast,hoanganh6491/CRToast,DerLobi/CRToast,perrystreetsoftware/CRToast,dmiedema/CRToast,AdamCampbell/CRToast,dedelost/CRToast,iosdevvivek/CRToast,mmmilo/CRToast,cnbin/CRToast,chinaljw/CRToast,Kevin775263419/CRToast,Trueey/CRToast,Naithar/CRToast,vladzz/CRToast,hulu001/CRToast,leoschweizer/CRToast,cruffenach/CRToast,Ashton-W/CRToast,Adorkable-forkable/CRToast,Kevin775263419/CRToast,grzesir/CRToast,yeahdongcn/CRToast,hoanganh6491/CRToast,gohjohn/CRToast
9490094b141003d692320113a662224a9fa2ef42
include/asm-mips/i8253.h
include/asm-mips/i8253.h
/* * Machine specific IO port address definition for generic. * Written by Osamu Tomita <tomita@cinet.co.jp> */ #ifndef _MACH_IO_PORTS_H #define _MACH_IO_PORTS_H /* i8253A PIT registers */ #define PIT_MODE 0x43 #define PIT_CH0 0x40 #define PIT_CH2 0x42 /* i8259A PIC registers */ #define PIC_MASTER_CMD 0x20 #define PIC_MASTER_IMR 0x21 #define PIC_MASTER_ISR PIC_MASTER_CMD #define PIC_MASTER_POLL PIC_MASTER_ISR #define PIC_MASTER_OCW3 PIC_MASTER_ISR #define PIC_SLAVE_CMD 0xa0 #define PIC_SLAVE_IMR 0xa1 /* i8259A PIC related value */ #define PIC_CASCADE_IR 2 #define MASTER_ICW4_DEFAULT 0x01 #define SLAVE_ICW4_DEFAULT 0x01 #define PIC_ICW4_AEOI 2 extern void setup_pit_timer(void); #endif /* !_MACH_IO_PORTS_H */
/* * Machine specific IO port address definition for generic. * Written by Osamu Tomita <tomita@cinet.co.jp> */ #ifndef __ASM_I8253_H #define __ASM_I8253_H /* i8253A PIT registers */ #define PIT_MODE 0x43 #define PIT_CH0 0x40 #define PIT_CH2 0x42 /* i8259A PIC registers */ #define PIC_MASTER_CMD 0x20 #define PIC_MASTER_IMR 0x21 #define PIC_MASTER_ISR PIC_MASTER_CMD #define PIC_MASTER_POLL PIC_MASTER_ISR #define PIC_MASTER_OCW3 PIC_MASTER_ISR #define PIC_SLAVE_CMD 0xa0 #define PIC_SLAVE_IMR 0xa1 /* i8259A PIC related value */ #define PIC_CASCADE_IR 2 #define MASTER_ICW4_DEFAULT 0x01 #define SLAVE_ICW4_DEFAULT 0x01 #define PIC_ICW4_AEOI 2 extern void setup_pit_timer(void); #endif /* __ASM_I8253_H */
Fix include wrapper symbol to something sane.
[MIPS] Fix include wrapper symbol to something sane. And why are there i8253.h and 8253pit.h ... Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
be6de4c1215a8ad5607b1fcc7e9e6da1de780877
src/include/common/controldata_utils.h
src/include/common/controldata_utils.h
/* * controldata_utils.h * Common code for pg_controldata output * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/controldata_utils.h */ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */
/* * controldata_utils.h * Common code for pg_controldata output * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/controldata_utils.h */ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H #include "catalog/pg_control.h" extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */
Add missing include for self-containment
Add missing include for self-containment
C
apache-2.0
greenplum-db/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,xinzweb/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,adam8157/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,adam8157/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,lisakowen/gpdb,jmcatamney/gpdb,50wu/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,lisakowen/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,adam8157/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,greenplum-db/gpdb
7b91a38d79ab14ea212a91a69a19b31111d1ba91
include/fish_detector/common/species_dialog.h
include/fish_detector/common/species_dialog.h
/// @file /// @brief Defines SpeciesDialog class. #ifndef SPECIES_DIALOG_H #define SPECIES_DIALOG_H #include <memory> #include <QWidget> #include <QDialog> #include "fish_detector/common/species.h" namespace Ui { class SpeciesDialog; } namespace fish_detector { class SpeciesDialog : public QDialog { Q_OBJECT #ifndef NO_TESTING friend class TestSpeciesDialog; #endif public: /// @brief Constructor. /// /// @param parent Parent widget. explicit SpeciesDialog(QWidget *parent = 0); /// @brief Returns a Species object corresponding to the dialog values. /// /// @return Species object corresponding to the dialog values. Species getSpecies(); private slots: /// @brief Emits the accepted signal. void on_ok_clicked(); /// @brief Emits the rejected signal. void on_cancel_clicked(); /// @brief Removes currently selected subspecies. void on_removeSubspecies_clicked(); /// @brief Adds a new subspecies. void on_addSubspecies_clicked(); private: /// @brief Widget loaded from ui file. std::unique_ptr<Ui::SpeciesDialog> ui_; }; } // namespace fish_detector #endif // SPECIES_DIALOG_H
/// @file /// @brief Defines SpeciesDialog class. #ifndef SPECIES_DIALOG_H #define SPECIES_DIALOG_H #include <memory> #include <QWidget> #include <QDialog> #include "fish_detector/common/species.h" namespace Ui { class SpeciesDialog; } namespace fish_detector { class SpeciesDialog : public QDialog { Q_OBJECT public: /// @brief Constructor. /// /// @param parent Parent widget. explicit SpeciesDialog(QWidget *parent = 0); /// @brief Returns a Species object corresponding to the dialog values. /// /// @return Species object corresponding to the dialog values. Species getSpecies(); private slots: /// @brief Calls inherited accept function. void on_ok_clicked(); /// @brief Calls inherited reject function. void on_cancel_clicked(); /// @brief Removes currently selected subspecies. void on_removeSubspecies_clicked(); /// @brief Adds a new subspecies. void on_addSubspecies_clicked(); private: /// @brief Widget loaded from ui file. std::unique_ptr<Ui::SpeciesDialog> ui_; }; } // namespace fish_detector #endif // SPECIES_DIALOG_H
Remove unused friend class declaration
Remove unused friend class declaration
C
mit
BGWoodward/FishDetector
2a655bcf9e5c30077197d314690ffbf86a042712
STTweetLabel/STTweetLabel.h
STTweetLabel/STTweetLabel.h
// // STTweetLabel.h // STTweetLabel // // Created by Sebastien Thiebaud on 09/29/13. // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // typedef enum { STTweetHandle = 0, STTweetHashtag, STTweetLink } STTweetHotWord; @interface STTweetLabel : UILabel @property (nonatomic, strong) NSArray *validProtocols; @property (nonatomic, assign) BOOL leftToRight; @property (nonatomic, assign) BOOL textSelectable; @property (nonatomic, strong) UIColor *selectionColor; @property (nonatomic, copy) void (^detectionBlock)(STTweetHotWord hotWord, NSString *string, NSString *protocol, NSRange range); - (void)setAttributes:(NSDictionary *)attributes; - (void)setAttributes:(NSDictionary *)attributes hotWord:(STTweetHotWord)hotWord; - (NSDictionary *)attributes; - (NSDictionary *)attributesForHotWord:(STTweetHotWord)hotWord; - (CGSize)suggestedFrameSizeToFitEntireStringConstraintedToWidth:(CGFloat)width; @end
// // STTweetLabel.h // STTweetLabel // // Created by Sebastien Thiebaud on 09/29/13. // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // typedef NS_ENUM(NSInteger, STTweetHotWord) { STTweetHandle = 0, STTweetHashtag, STTweetLink }; @interface STTweetLabel : UILabel @property (nonatomic, strong) NSArray *validProtocols; @property (nonatomic, assign) BOOL leftToRight; @property (nonatomic, assign) BOOL textSelectable; @property (nonatomic, strong) UIColor *selectionColor; @property (nonatomic, copy) void (^detectionBlock)(STTweetHotWord hotWord, NSString *string, NSString *protocol, NSRange range); - (void)setAttributes:(NSDictionary *)attributes; - (void)setAttributes:(NSDictionary *)attributes hotWord:(STTweetHotWord)hotWord; - (NSDictionary *)attributes; - (NSDictionary *)attributesForHotWord:(STTweetHotWord)hotWord; - (CGSize)suggestedFrameSizeToFitEntireStringConstraintedToWidth:(CGFloat)width; @end
Make enum available to swift
Make enum available to swift
C
mit
bespider/STTweetLabel,pankkor/STTweetLabel,pabelnl/STTweetLabel,HackRoy/STTweetLabel,SebastienThiebaud/STTweetLabel,quanquan1986/STTweetLabel
0699830cd0dd5b606647c28c7e4b0965c418e6b8
MenuItemKit/MenuItemKit.h
MenuItemKit/MenuItemKit.h
// // MenuItemKit.h // MenuItemKit // // Created by CHEN Xian’an on 1/16/16. // Copyright © 2016 lazyapps. All rights reserved. // #import <UIKit/UIKit.h> #import "Headers.h" //! Project version number for MenuItemKit. FOUNDATION_EXPORT double MenuItemKitVersionNumber; //! Project version string for MenuItemKit. FOUNDATION_EXPORT const unsigned char MenuItemKitVersionString[];
// // MenuItemKit.h // MenuItemKit // // Created by CHEN Xian’an on 1/16/16. // Copyright © 2016 lazyapps. All rights reserved. // #import <UIKit/UIKit.h> #import <MenuItemKit/Headers.h> //! Project version number for MenuItemKit. FOUNDATION_EXPORT double MenuItemKitVersionNumber; //! Project version string for MenuItemKit. FOUNDATION_EXPORT const unsigned char MenuItemKitVersionString[];
Use brackets for headers as Xcode suggested
Use brackets for headers as Xcode suggested
C
mit
cxa/MenuItemKit,cxa/MenuItemKit
2b71152eafc98a35bca1b99a8fa0ab4a053876f8
RMGallery/RMGallery.h
RMGallery/RMGallery.h
// // RMGallery.h // RMGallery // // Created by Hermés Piqué on 16/05/14. // Copyright (c) 2014 Robot Media. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import "RMGalleryViewController.h" #import "RMGalleryTransition.h"
// // RMGallery.h // RMGallery // // Created by Hermés Piqué on 16/05/14. // Copyright (c) 2014 Robot Media. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import "RMGalleryViewController.h" #import "RMGalleryTransition.h"
Add new line at end of file to fix build
Add new line at end of file to fix build
C
apache-2.0
UrbanCompass/RMGallery
c923f1c951486603591d797c5f7fb7a0c2b923a5
FTFountain/iOS/FTFountainiOS.h
FTFountain/iOS/FTFountainiOS.h
// // FTFountainiOS.h // FTFountain // // Created by Tobias Kräntzer on 18.07.15. // Copyright (c) 2015 Tobias Kräntzer. All rights reserved. // // Adapter #import "FTTableViewAdapter.h" #import "FTCollectionViewAdapter.h"
// // FTFountainiOS.h // FTFountain // // Created by Tobias Kräntzer on 18.07.15. // Copyright (c) 2015 Tobias Kräntzer. All rights reserved. // // Adapter #import "FTTableViewAdapter.h" #import "FTTableViewAdapter+Subclassing.h" #import "FTCollectionViewAdapter.h" #import "FTCollectionViewAdapter+Subclassing.h"
Add subclassing headers for the table and collection view adapter to the umbrella header
Add subclassing headers for the table and collection view adapter to the umbrella header
C
bsd-3-clause
anagromataf/Fountain,anagromataf/Fountain
cf0aebe327a7086e4c31a37aaa9b91491c619681
src/Engine/Input.h
src/Engine/Input.h
#pragma once #include "SDL.h" #include "Component.h" #include "Point.h" #define NUM_MOUSE_BUTTONS 5 #define CONTROLLER_JOYSTICK_DEATHZONE 8000 class Input { public: Input(); ~Input(); void Poll(const SDL_Event& e); bool IsKeyPressed(SDL_Scancode key); bool IsKeyHeld(SDL_Scancode key) const; bool IsKeyReleased(SDL_Scancode key); SDL_GameController *controller1 = nullptr; SDL_GameController *controller2 = nullptr; bool IsControllerButtonPressed(SDL_GameController* controller, SDL_GameControllerButton button); bool IsControllerButtonHeld(SDL_GameController* controller, SDL_GameControllerButton button) const; bool IsControllerButtonReleased(SDL_GameController* controller, SDL_GameControllerButton button); bool IsMouseButtonPressed(int button) const; bool IsMouseButtonHeld(int button) const; bool IsMouseButtonReleased(int button) const; float MouseX() const; float MouseY() const; Point GetMousePosition(Point& position) const; private: bool keys[SDL_NUM_SCANCODES]; bool lastKeys[SDL_NUM_SCANCODES]; bool lastControllerButtons[SDL_CONTROLLER_BUTTON_MAX]; void OpenControllers(); bool mouseButtons[NUM_MOUSE_BUTTONS]; bool lastMouseButtons[NUM_MOUSE_BUTTONS]; };
#pragma once #include "SDL.h" #include "Component.h" #include "Point.h" #define NUM_MOUSE_BUTTONS 5 #define CONTROLLER_JOYSTICK_DEATHZONE 8000 class Input { public: Input(); ~Input(); void Poll(const SDL_Event& e); bool IsKeyPressed(SDL_Scancode key); bool IsKeyHeld(SDL_Scancode key) const; bool IsKeyReleased(SDL_Scancode key); SDL_GameController *controller1 = nullptr; SDL_GameController *controller2 = nullptr; bool IsControllerButtonPressed(SDL_GameController* controller, SDL_GameControllerButton button); bool IsControllerButtonHeld(SDL_GameController* controller, SDL_GameControllerButton button) const; bool IsControllerButtonReleased(SDL_GameController* controller, SDL_GameControllerButton button); bool IsMouseButtonPressed(int button) const; bool IsMouseButtonHeld(int button) const; bool IsMouseButtonReleased(int button) const; float MouseX() const; float MouseY() const; Point GetMousePosition(Point& position) const; private: bool keys[SDL_NUM_SCANCODES]; bool lastKeys[SDL_NUM_SCANCODES]; bool lastControllerButtons[SDL_CONTROLLER_BUTTON_MAX]; void OpenControllers(); bool mouseButtons[NUM_MOUSE_BUTTONS]; bool lastMouseButtons[NUM_MOUSE_BUTTONS]; //Might need SDL_MouseMotionEvent instead //Point mousePosition; };
Add mousePosition as Point, now commented for reworking
Add mousePosition as Point, now commented for reworking
C
mit
CollegeBart/bart-sdl-engine-e16,CollegeBart/bart-sdl-engine-e16
a71cffa0a3a3efb64a8ea3b4ce110217f62b90fa
Solutions/03/view.stat.c
Solutions/03/view.stat.c
#include <stdio.h> #include <linux/types.h> #include <unistd.h> #include <fcntl.h> int main (int argc, char * argv []) { __u64 rdtsc = 0; __u64 i = 0; int fileStat = open (argv [1], O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); while (read (fileStat, &rdtsc, sizeof (rdtsc) ) > 0) { printf ("%llu:\t%llu\n", ++i, rdtsc); } close (fileStat); }
#include <stdio.h> #include <linux/types.h> #include <unistd.h> #include <fcntl.h> #include <stdlib.h> int main (int argc, char * argv []) { __u64 rdtsc = 0; __u64 i = 0; int fileStat = open (argv [1], O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); while (read (fileStat, &rdtsc, sizeof (rdtsc) ) > 0) { printf ("%llu:\t%llu\n", ++i, rdtsc); } close (fileStat); return EXIT_SUCCESS; }
Fix trivial error: return void in main function.
Fix trivial error: return void in main function.
C
mit
Gluttton/PslRK,Gluttton/PslRK,Gluttton/PslRK
ca7fe8327518ae9d04f8e5b68f01ffabe699db52
native/fallocate_darwin.c
native/fallocate_darwin.c
#define _FILE_OFFSET_BITS 64 #include <fcntl.h> int native_fallocate(int fd, uint64_t len) { fstore_t fstore; fstore.fst_flags = F_ALLOCATECONTIG; fstore.fst_posmode = F_PEOFPOSMODE; fstore.fst_offset = 0; fstore.fst_length = len; fstore.fst_bytesalloc = 0; return fcntl(fd, F_PREALLOCATE, &fstore); }
#define _FILE_OFFSET_BITS 64 #include <fcntl.h> #include <stdint.h> int native_fallocate(int fd, uint64_t len) { fstore_t fstore; fstore.fst_flags = F_ALLOCATECONTIG; fstore.fst_posmode = F_PEOFPOSMODE; fstore.fst_offset = 0; fstore.fst_length = len; fstore.fst_bytesalloc = 0; return fcntl(fd, F_PREALLOCATE, &fstore); }
Add proper header for darwin build
Add proper header for darwin build
C
isc
Luminarys/synapse,Luminarys/synapse,Luminarys/synapse
4390c6c6c9de3934e1bf05cb7132f3ae908a4c35
src/main.c
src/main.c
// Copyright 2016 Mitchell Kember. Subject to the MIT License. #include "translate.h" #include "transmit.h" #include "util.h" #include <stdio.h> #include <unistd.h> int main(int argc, char **argv) { setup_util(argv[0]); // Initialize the default mode. int mode = 'e'; // Get command line options. int c; extern char *optarg; extern int optind, optopt; while ((c = getopt(argc, argv, "hedt")) != -1) { switch (c) { case 'h': print_usage(stdout); return 0; case 'e': case 'd': case 't': mode = c; break; case '?': return 1; } } // Make sure all arguments were processed. if (optind != argc) { print_usage(stderr); return 1; } // Dispatch to the chosen subprogram. switch (mode) { case 'e': return encode(); case 'd': return decode(); case 't': return transmit(); } }
// Copyright 2016 Mitchell Kember. Subject to the MIT License. #include "translate.h" #include "transmit.h" #include "util.h" #include <stdio.h> #include <unistd.h> int main(int argc, char **argv) { setup_util(argv[0]); // Initialize the default mode. int mode = 'e'; // Get command line options. int c; extern char *optarg; extern int optind, optopt; while ((c = getopt(argc, argv, "hedt")) != -1) { switch (c) { case 'h': print_usage(stdout); return 0; case 'e': case 'd': case 't': mode = c; break; case '?': print_usage(stderr); return 1; } } // Make sure all arguments were processed. if (optind != argc) { print_usage(stderr); return 1; } // Dispatch to the chosen subprogram. switch (mode) { case 'e': return encode(); case 'd': return decode(); case 't': return transmit(); } }
Print usage message on getopt error
Print usage message on getopt error
C
mit
mk12/morse
92ccc1fa3f8ac72673dd56e3d691103c0a6ec871
src/lock.h
src/lock.h
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; typedef struct lock lock_t; struct lock { int fd; enum lockstat status; char *path; lock_t *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_init(const char *path); extern void lock_free(struct lock **lock); // Need to test lock->status to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; struct lock { int fd; enum lockstat status; char *path; struct lock *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_init(const char *path); extern void lock_free(struct lock **lock); // Need to test lock->status to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif
Fix a build issue on Solaris
Fix a build issue on Solaris
C
agpl-3.0
rubenk/burp,rubenk/burp,rubenk/burp
7b0b2ca43517ef59aa78c3ad4ce2c49df9bffaff
include/private/SkSpinlock.h
include/private/SkSpinlock.h
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSpinlock_DEFINED #define SkSpinlock_DEFINED #include <atomic> class SkSpinlock { public: void acquire() { // To act as a mutex, we need an acquire barrier when we acquire the lock. if (fLocked.exchange(true, std::memory_order_acquire)) { // Lock was contended. Fall back to an out-of-line spin loop. this->contendedAcquire(); } } void release() { // To act as a mutex, we need a release barrier when we release the lock. fLocked.store(false, std::memory_order_release); } private: void contendedAcquire(); std::atomic<bool> fLocked{false}; }; #endif//SkSpinlock_DEFINED
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSpinlock_DEFINED #define SkSpinlock_DEFINED #include "SkTypes.h" #include <atomic> class SkSpinlock { public: void acquire() { // To act as a mutex, we need an acquire barrier when we acquire the lock. if (fLocked.exchange(true, std::memory_order_acquire)) { // Lock was contended. Fall back to an out-of-line spin loop. this->contendedAcquire(); } } void release() { // To act as a mutex, we need a release barrier when we release the lock. fLocked.store(false, std::memory_order_release); } private: SK_API void contendedAcquire(); std::atomic<bool> fLocked{false}; }; #endif//SkSpinlock_DEFINED
Make Cmake work with debug build
Make Cmake work with debug build Before this CL, the following failed to link: cd .../skia git fetch git checkout origin/master git clean -ffdx SKIA="$PWD" cd $(mktemp -d); cmake "${SKIA}/cmake" -DCMAKE_BUILD_TYPE=Debug -G Ninja ninja GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1757993006 Review URL: https://codereview.chromium.org/1757993006
C
bsd-3-clause
HalCanary/skia-hc,google/skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,google/skia,tmpvar/skia.cc,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,tmpvar/skia.cc,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,tmpvar/skia.cc,tmpvar/skia.cc,qrealka/skia-hc,rubenvb/skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,qrealka/skia-hc,tmpvar/skia.cc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,qrealka/skia-hc,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,tmpvar/skia.cc,tmpvar/skia.cc,rubenvb/skia,google/skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,qrealka/skia-hc
9b4050f924a3ac59e1a390fff1ca94690c7b648c
hw/mcu/nordic/nrf52xxx-compat/include/nrfx_config.h
hw/mcu/nordic/nrf52xxx-compat/include/nrfx_config.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 NRFX_CONFIG_H__ #define NRFX_CONFIG_H__ #if NRF52 #include "../../nrf52xxx-compat/include/nrfx52_config.h" #elif NRF52840_XXAA #include "../../nrf52xxx-compat/include/nrfx52840_config.h" #else #error Unsupported chip selected #endif #endif // NRFX_CONFIG_H__
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 NRFX_CONFIG_H__ #define NRFX_CONFIG_H__ #if NRF52 #include "nrfx52_config.h" #elif NRF52840_XXAA #include "nrfx52840_config.h" #else #error Unsupported chip selected #endif #endif // NRFX_CONFIG_H__
Fix weird includes in compat package
hw/mcu/nordic: Fix weird includes in compat package
C
apache-2.0
mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core,mlaz/mynewt-core
3c701bdbd8c761b885c8f7332b034ab6c6b6daab
core/metautils/src/vectorLinkdef.h
core/metautils/src/vectorLinkdef.h
#include <string> #include <vector> #ifndef __hpux using namespace std; #endif #pragma create TClass vector<bool>; #pragma create TClass vector<char>; #pragma create TClass vector<short>; #pragma create TClass vector<long>; #pragma create TClass vector<unsigned char>; #pragma create TClass vector<unsigned short>; #pragma create TClass vector<unsigned int>; #pragma create TClass vector<unsigned long>; #pragma create TClass vector<float>; #pragma create TClass vector<double>; #pragma create TClass vector<char*>; #pragma create TClass vector<const char*>; #pragma create TClass vector<string>; #if (!(G__GNUC==3 && G__GNUC_MINOR==1)) && !defined(G__KCC) && (!defined(G__VISUAL) || G__MSC_VER<1300) // gcc3.1,3.2 has a problem with iterator<void*,...,void&> #pragma create TClass vector<void*>; #endif
#include <string> #include <vector> #ifndef __hpux using namespace std; #endif #pragma create TClass vector<bool>; #pragma create TClass vector<char>; #pragma create TClass vector<short>; #pragma create TClass vector<long>; #pragma create TClass vector<unsigned char>; #pragma create TClass vector<unsigned short>; #pragma create TClass vector<unsigned int>; #pragma create TClass vector<unsigned long>; #pragma create TClass vector<float>; #pragma create TClass vector<double>; #pragma create TClass vector<char*>; #pragma create TClass vector<const char*>; #pragma create TClass vector<string>; #pragma create TClass vector<Long64_t>; #pragma create TClass vector<ULong64_t>; #if (!(G__GNUC==3 && G__GNUC_MINOR==1)) && !defined(G__KCC) && (!defined(G__VISUAL) || G__MSC_VER<1300) // gcc3.1,3.2 has a problem with iterator<void*,...,void&> #pragma create TClass vector<void*>; #endif
Add missing TClass creation for vector<Long64_t> and vector<ULong64_t>
Add missing TClass creation for vector<Long64_t> and vector<ULong64_t> git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@38659 27541ba8-7e3a-0410-8455-c3a389f83636
C
lgpl-2.1
thomaskeck/root,Duraznos/root,beniz/root,perovic/root,perovic/root,Y--/root,agarciamontoro/root,georgtroska/root,sawenzel/root,gganis/root,nilqed/root,buuck/root,buuck/root,simonpf/root,nilqed/root,davidlt/root,omazapa/root,0x0all/ROOT,perovic/root,veprbl/root,esakellari/my_root_for_test,lgiommi/root,dfunke/root,ffurano/root5,ffurano/root5,BerserkerTroll/root,BerserkerTroll/root,mattkretz/root,tc3t/qoot,abhinavmoudgil95/root,esakellari/my_root_for_test,esakellari/my_root_for_test,gganis/root,davidlt/root,0x0all/ROOT,olifre/root,gganis/root,evgeny-boger/root,krafczyk/root,bbockelm/root,zzxuanyuan/root-compressor-dummy,davidlt/root,Y--/root,BerserkerTroll/root,cxx-hep/root-cern,lgiommi/root,omazapa/root-old,arch1tect0r/root,CristinaCristescu/root,smarinac/root,evgeny-boger/root,esakellari/root,gbitzes/root,gganis/root,beniz/root,kirbyherm/root-r-tools,beniz/root,thomaskeck/root,nilqed/root,omazapa/root-old,jrtomps/root,beniz/root,evgeny-boger/root,arch1tect0r/root,gbitzes/root,sirinath/root,perovic/root,buuck/root,davidlt/root,tc3t/qoot,zzxuanyuan/root,perovic/root,esakellari/root,mattkretz/root,lgiommi/root,agarciamontoro/root,gbitzes/root,karies/root,vukasinmilosevic/root,dfunke/root,simonpf/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,olifre/root,abhinavmoudgil95/root,pspe/root,BerserkerTroll/root,mhuwiler/rootauto,bbockelm/root,mhuwiler/rootauto,mkret2/root,Dr15Jones/root,nilqed/root,Y--/root,tc3t/qoot,dfunke/root,evgeny-boger/root,veprbl/root,mkret2/root,CristinaCristescu/root,veprbl/root,kirbyherm/root-r-tools,evgeny-boger/root,veprbl/root,zzxuanyuan/root,mhuwiler/rootauto,buuck/root,karies/root,georgtroska/root,omazapa/root-old,Y--/root,0x0all/ROOT,satyarth934/root,simonpf/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,agarciamontoro/root,jrtomps/root,simonpf/root,Dr15Jones/root,thomaskeck/root,zzxuanyuan/root,sbinet/cxx-root,esakellari/root,gbitzes/root,veprbl/root,Y--/root,tc3t/qoot,zzxuanyuan/root,satyarth934/root,perovic/root,mattkretz/root,olifre/root,pspe/root,CristinaCristescu/root,satyarth934/root,CristinaCristescu/root,zzxuanyuan/root,ffurano/root5,esakellari/root,pspe/root,jrtomps/root,mkret2/root,satyarth934/root,bbockelm/root,strykejern/TTreeReader,esakellari/root,Dr15Jones/root,veprbl/root,cxx-hep/root-cern,0x0all/ROOT,sawenzel/root,beniz/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,karies/root,beniz/root,zzxuanyuan/root,sawenzel/root,Y--/root,sawenzel/root,zzxuanyuan/root-compressor-dummy,Dr15Jones/root,nilqed/root,simonpf/root,esakellari/root,satyarth934/root,georgtroska/root,perovic/root,lgiommi/root,abhinavmoudgil95/root,karies/root,esakellari/my_root_for_test,satyarth934/root,mkret2/root,root-mirror/root,sbinet/cxx-root,agarciamontoro/root,sirinath/root,zzxuanyuan/root-compressor-dummy,0x0all/ROOT,buuck/root,ffurano/root5,mattkretz/root,root-mirror/root,lgiommi/root,vukasinmilosevic/root,thomaskeck/root,olifre/root,bbockelm/root,kirbyherm/root-r-tools,alexschlueter/cern-root,Y--/root,vukasinmilosevic/root,root-mirror/root,veprbl/root,esakellari/my_root_for_test,abhinavmoudgil95/root,sawenzel/root,esakellari/root,georgtroska/root,Y--/root,esakellari/root,jrtomps/root,sirinath/root,abhinavmoudgil95/root,buuck/root,gbitzes/root,omazapa/root,nilqed/root,mkret2/root,georgtroska/root,sawenzel/root,karies/root,nilqed/root,evgeny-boger/root,BerserkerTroll/root,nilqed/root,nilqed/root,buuck/root,strykejern/TTreeReader,cxx-hep/root-cern,olifre/root,sbinet/cxx-root,mattkretz/root,root-mirror/root,sirinath/root,tc3t/qoot,strykejern/TTreeReader,Duraznos/root,pspe/root,jrtomps/root,davidlt/root,simonpf/root,sbinet/cxx-root,mattkretz/root,gganis/root,lgiommi/root,dfunke/root,satyarth934/root,esakellari/my_root_for_test,satyarth934/root,BerserkerTroll/root,olifre/root,simonpf/root,omazapa/root,arch1tect0r/root,CristinaCristescu/root,Duraznos/root,karies/root,Dr15Jones/root,CristinaCristescu/root,zzxuanyuan/root-compressor-dummy,pspe/root,mhuwiler/rootauto,karies/root,strykejern/TTreeReader,zzxuanyuan/root-compressor-dummy,root-mirror/root,strykejern/TTreeReader,jrtomps/root,alexschlueter/cern-root,satyarth934/root,karies/root,zzxuanyuan/root,krafczyk/root,root-mirror/root,evgeny-boger/root,perovic/root,Y--/root,kirbyherm/root-r-tools,gbitzes/root,gbitzes/root,satyarth934/root,krafczyk/root,bbockelm/root,bbockelm/root,CristinaCristescu/root,nilqed/root,Duraznos/root,thomaskeck/root,smarinac/root,kirbyherm/root-r-tools,karies/root,georgtroska/root,lgiommi/root,ffurano/root5,pspe/root,Y--/root,omazapa/root,smarinac/root,sbinet/cxx-root,gbitzes/root,jrtomps/root,dfunke/root,mattkretz/root,tc3t/qoot,abhinavmoudgil95/root,zzxuanyuan/root,pspe/root,sirinath/root,sirinath/root,mhuwiler/rootauto,sawenzel/root,omazapa/root-old,dfunke/root,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,krafczyk/root,ffurano/root5,zzxuanyuan/root,strykejern/TTreeReader,Duraznos/root,krafczyk/root,omazapa/root-old,alexschlueter/cern-root,georgtroska/root,CristinaCristescu/root,thomaskeck/root,vukasinmilosevic/root,sirinath/root,0x0all/ROOT,omazapa/root,tc3t/qoot,agarciamontoro/root,evgeny-boger/root,simonpf/root,davidlt/root,strykejern/TTreeReader,gganis/root,smarinac/root,root-mirror/root,omazapa/root-old,0x0all/ROOT,mhuwiler/rootauto,cxx-hep/root-cern,davidlt/root,dfunke/root,abhinavmoudgil95/root,alexschlueter/cern-root,omazapa/root,buuck/root,dfunke/root,mhuwiler/rootauto,esakellari/root,beniz/root,thomaskeck/root,CristinaCristescu/root,sbinet/cxx-root,dfunke/root,alexschlueter/cern-root,Duraznos/root,smarinac/root,gganis/root,gganis/root,mkret2/root,root-mirror/root,satyarth934/root,karies/root,Duraznos/root,zzxuanyuan/root-compressor-dummy,ffurano/root5,esakellari/my_root_for_test,cxx-hep/root-cern,omazapa/root-old,agarciamontoro/root,sbinet/cxx-root,mkret2/root,gganis/root,sirinath/root,sirinath/root,Dr15Jones/root,0x0all/ROOT,perovic/root,jrtomps/root,vukasinmilosevic/root,olifre/root,olifre/root,mhuwiler/rootauto,BerserkerTroll/root,thomaskeck/root,alexschlueter/cern-root,root-mirror/root,thomaskeck/root,krafczyk/root,olifre/root,sbinet/cxx-root,tc3t/qoot,omazapa/root-old,agarciamontoro/root,perovic/root,omazapa/root,omazapa/root-old,arch1tect0r/root,gbitzes/root,sbinet/cxx-root,arch1tect0r/root,kirbyherm/root-r-tools,davidlt/root,smarinac/root,krafczyk/root,beniz/root,agarciamontoro/root,agarciamontoro/root,esakellari/my_root_for_test,omazapa/root-old,cxx-hep/root-cern,simonpf/root,gbitzes/root,davidlt/root,simonpf/root,Duraznos/root,lgiommi/root,omazapa/root,smarinac/root,pspe/root,pspe/root,georgtroska/root,veprbl/root,alexschlueter/cern-root,sawenzel/root,smarinac/root,bbockelm/root,Duraznos/root,veprbl/root,zzxuanyuan/root-compressor-dummy,esakellari/my_root_for_test,georgtroska/root,vukasinmilosevic/root,sbinet/cxx-root,root-mirror/root,mhuwiler/rootauto,omazapa/root,gbitzes/root,vukasinmilosevic/root,agarciamontoro/root,arch1tect0r/root,mattkretz/root,beniz/root,mhuwiler/rootauto,mhuwiler/rootauto,lgiommi/root,buuck/root,Duraznos/root,georgtroska/root,CristinaCristescu/root,BerserkerTroll/root,bbockelm/root,sawenzel/root,dfunke/root,Dr15Jones/root,veprbl/root,root-mirror/root,arch1tect0r/root,nilqed/root,sbinet/cxx-root,CristinaCristescu/root,krafczyk/root,lgiommi/root,BerserkerTroll/root,jrtomps/root,beniz/root,omazapa/root,arch1tect0r/root,perovic/root,mkret2/root,mattkretz/root,davidlt/root,vukasinmilosevic/root,beniz/root,olifre/root,omazapa/root,esakellari/root,pspe/root,krafczyk/root,vukasinmilosevic/root,vukasinmilosevic/root,tc3t/qoot,thomaskeck/root,jrtomps/root,bbockelm/root,smarinac/root,agarciamontoro/root,evgeny-boger/root,abhinavmoudgil95/root,cxx-hep/root-cern,davidlt/root,zzxuanyuan/root,sirinath/root,sawenzel/root,mattkretz/root,0x0all/ROOT,mattkretz/root,bbockelm/root,lgiommi/root,esakellari/root,Duraznos/root,esakellari/my_root_for_test,krafczyk/root,simonpf/root,zzxuanyuan/root,vukasinmilosevic/root,georgtroska/root,arch1tect0r/root,bbockelm/root,BerserkerTroll/root,gganis/root,omazapa/root-old,karies/root,sirinath/root,evgeny-boger/root,sawenzel/root,smarinac/root,Y--/root,dfunke/root,krafczyk/root,arch1tect0r/root,jrtomps/root,buuck/root,olifre/root,abhinavmoudgil95/root,tc3t/qoot,evgeny-boger/root,kirbyherm/root-r-tools,abhinavmoudgil95/root,pspe/root,mkret2/root,cxx-hep/root-cern,mkret2/root,veprbl/root,buuck/root,gganis/root,mkret2/root
b49fa616d47a39193c59d610964276ddb1df732a
runtime/GCCLibraries/libc/memory.c
runtime/GCCLibraries/libc/memory.c
//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===// // // A lot of this code is ripped gratuitously from glibc and libiberty. // //===----------------------------------------------------------------------===// #include <stdlib.h> void *malloc(size_t) __attribute__((weak)); void free(void *) __attribute__((weak)); void *memset(void *, int, size_t) __attribute__((weak)); void *calloc(size_t nelem, size_t elsize) __attribute__((weak)); void *calloc(size_t nelem, size_t elsize) { void *Result = malloc(nelem*elsize); return memset(Result, 0, nelem*elsize); }
//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===// // // A lot of this code is ripped gratuitously from glibc and libiberty. // //===---------------------------------------------------------------------===// #include <stdlib.h> // If we're not being compiled with GCC, turn off attributes. Question is how // to handle overriding of memory allocation functions in that case. #ifndef __GNUC__ #define __attribute__(X) #endif // For now, turn off the weak linkage attribute on Mac OS X. #if defined(__GNUC__) && defined(__APPLE_CC__) #define __ATTRIBUTE_WEAK__ #elif defined(__GNUC__) #define __ATTRIBUTE_WEAK__ __attribute__((weak)) #else #define __ATTRIBUTE_WEAK__ #endif void *malloc(size_t) __ATTRIBUTE_WEAK__; void free(void *) __ATTRIBUTE_WEAK__; void *memset(void *, int, size_t) __ATTRIBUTE_WEAK__; void *calloc(size_t nelem, size_t elsize) __ATTRIBUTE_WEAK__; void *calloc(size_t nelem, size_t elsize) { void *Result = malloc(nelem*elsize); return memset(Result, 0, nelem*elsize); }
Disable __attribute__((weak)) on Mac OS X and other lame platforms.
Disable __attribute__((weak)) on Mac OS X and other lame platforms. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@10489 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm
24663de702224e464ac5036ddea96f4cc070f090
TrackingControllerDefs.h
TrackingControllerDefs.h
// // TrackingControllerDefs.h // // Created by Matt Martel on 02/20/09 // Copyright Mundue LLC 2008-2011. All rights reserved. // // Create an account at http://www.flurry.com // Code and integration instructions at // http://dev.flurry.com/createProjectSelectPlatform.do #define USES_FLURRY #define kFlurryAPIKey @"YOUR_FLURRY_API_KEY" // Create an account at http://www.localytics.com // Code and integration instructions at // http://wiki.localytics.com/doku.php #define USES_LOCALYTICS #define kLocalyticsAppKey @"YOUR_LOCALITICS_APP_KEY" // Create an account at http://www.google.com/analytics // Code and integration instructions at // http://code.google.com/mobile/analytics/docs/iphone/ #define USES_GANTRACKER #define kGANAccountIDKey @"YOUR_GOOGLE_ANALYTICS_ACCOUNT_ID" #define kGANCategoryKey @"YOUR_APP_NAME"
// // TrackingControllerDefs.h // // Created by Matt Martel on 02/20/09 // Copyright Mundue LLC 2008-2011. All rights reserved. // // Create an account at http://www.flurry.com // Code and integration instructions at // http://dev.flurry.com/createProjectSelectPlatform.do // Uncomment the following two lines to use Flurry //#define USES_FLURRY //#define kFlurryAPIKey @"YOUR_FLURRY_API_KEY" // Create an account at http://www.localytics.com // Code and integration instructions at // http://wiki.localytics.com/doku.php // Uncomment the following two lines to use Localytics //#define USES_LOCALYTICS //#define kLocalyticsAppKey @"YOUR_LOCALITICS_APP_KEY" // Create an account at http://www.google.com/analytics // Code and integration instructions at // http://code.google.com/mobile/analytics/docs/iphone/ // Uncomment the following three lines to use Google Analytics //#define USES_GANTRACKER //#define kGANAccountIDKey @"YOUR_GOOGLE_ANALYTICS_ACCOUNT_ID" //#define kGANCategoryKey @"YOUR_APP_NAME"
Comment out services by default
Comment out services by default
C
mit
mundue/MMTrackingController
e4f4ddadac119535f6cd7e1eb612f3de35100516
include/tasks/train_master.h
include/tasks/train_master.h
#ifndef __TRAIN_MASTER_H__ #define __TRAIN_MASTER_H__ void __attribute__ ((noreturn)) train_master(); typedef enum { MASTER_CHANGE_SPEED, MASTER_REVERSE, // step 1 MASTER_REVERSE2, // step 2 (used by delay courier) MASTER_REVERSE3, // step 3 (used by delay courier) MASTER_WHERE_ARE_YOU, MASTER_STOP_AT_SENSOR, MASTER_GOTO_LOCATION, MASTER_DUMP_VELOCITY_TABLE, MASTER_UPDATE_FEEDBACK_THRESHOLD, MASTER_UPDATE_FEEDBACK_ALPHA, MASTER_UPDATE_STOP_OFFSET, MASTER_UPDATE_CLEARANCE_OFFSET, MASTER_ACCELERATION_COMPLETE, MASTER_NEXT_NODE_ESTIMATE, MASTER_SENSOR_FEEDBACK, MASTER_UNEXPECTED_SENSOR_FEEDBACK } master_req_type; typedef struct { master_req_type type; int arg1; int arg2; int arg3; } master_req; #endif
#ifndef __TRAIN_MASTER_H__ #define __TRAIN_MASTER_H__ void __attribute__ ((noreturn)) train_master(); typedef enum { MASTER_CHANGE_SPEED, MASTER_REVERSE, // step 1 MASTER_REVERSE2, // step 2 (used by delay courier) MASTER_REVERSE3, // step 3 (used by delay courier) MASTER_WHERE_ARE_YOU, MASTER_STOP_AT_SENSOR, MASTER_GOTO_LOCATION, MASTER_DUMP_VELOCITY_TABLE, MASTER_UPDATE_FEEDBACK_THRESHOLD, MASTER_UPDATE_FEEDBACK_ALPHA, MASTER_UPDATE_STOP_OFFSET, MASTER_UPDATE_CLEARANCE_OFFSET, MASTER_ACCELERATION_COMPLETE, MASTER_NEXT_NODE_ESTIMATE, MASTER_SENSOR_FEEDBACK, MASTER_UNEXPECTED_SENSOR_FEEDBACK } master_req_type; typedef struct { master_req_type type; int arg1; int arg2; } master_req; #endif
Remove unused argument space from master req
Remove unused argument space from master req
C
mit
ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme
61797de177d095713049cbd8c4f830cc5d0c7045
BotKit/BotKit.h
BotKit/BotKit.h
// // BotKit.h // BotKit // // Created by Mark Adams on 9/28/12. // Copyright (c) 2012 thoughtbot. All rights reserved. // #import "BKCoreDataManager.h" #import "BKManagedViewController.h" #import "BKManagedTableViewController.h" #import "NSObject+BKCoding.h" #import "NSArray+ObjectAccess.h" #import "NSDate+RelativeDates.h" #import "UIColor+AdjustColor.h" #import "UIColor+Serialization.h" /* TODOS: BKImageLoader -imageWithContentsOfURL:completionHandler: -imageWithContentsOFURLPath:completionHandler: UIImage: +imageWithContentsOfURLPath: NSURLRequest: +requestWithString: +requestWithURL: NSDate: -dateStringWithFormat: -dateStringWithStyle: */
// // BotKit.h // BotKit // // Created by Mark Adams on 9/28/12. // Copyright (c) 2012 thoughtbot. All rights reserved. // #import "BKCoreDataManager.h" #import "BKManagedViewController.h" #import "BKManagedTableViewController.h" #import "NSObject+BKCoding.h" #import "NSArray+ObjectAccess.h" #import "NSDate+RelativeDates.h" #import "UIColor+AdjustColor.h" #import "UIColor+Serialization.h" #import "NSData+Base64Encoding.h" /* TODOS: BKImageLoader -imageWithContentsOfURL:completionHandler: -imageWithContentsOFURLPath:completionHandler: UIImage: +imageWithContentsOfURLPath: NSURLRequest: +requestWithString: +requestWithURL: NSDate: -dateStringWithFormat: -dateStringWithStyle: */
Add NSData+Base64Encoding.h to main header
Add NSData+Base64Encoding.h to main header
C
mit
thoughtbot/BotKit,thoughtbot/BotKit
f3e611c9e373a0147be472cb7913f3604baf2a08
log.c
log.c
#include "log.h" #include "timeutil.h" #include <stdarg.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static bool flushAfterLog = false; void proxyLogSetFlush(bool enabled) { flushAfterLog = enabled; } void proxyLog(const char* format, ...) { va_list args; va_start(args, format); printTimeString(); printf(" "); vprintf(format, args); printf("\n"); if (flushAfterLog) { fflush(stdout); } va_end(args); }
#include "log.h" #include "timeutil.h" #include <stdarg.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> static bool flushAfterLog = false; void proxyLogSetFlush(bool enabled) { flushAfterLog = enabled; } void proxyLog(const char* format, ...) { va_list args; va_start(args, format); printTimeString(); putchar(' '); vprintf(format, args); putchar('\n'); if (flushAfterLog) { fflush(stdout); } va_end(args); }
Use putchar instead of printf.
Use putchar instead of printf.
C
mit
aaronriekenberg/openbsd_cproxy,aaronriekenberg/openbsd_cproxy
ad9cd9bfff8f0b7428c68ba02857a5789d8c3b77
demo/embedding/helloworld.c
demo/embedding/helloworld.c
#include <stdio.h> #include <mpi.h> #include <Python.h> const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" "myrank = MPI.COMM_WORLD.Get_rank() \n" "nprocs = MPI.COMM_WORLD.Get_size() \n" "procnm = MPI.Get_processor_name() \n" "print (hwmess % (myrank, nprocs, procnm)) \n" ""; int main(int argc, char *argv[]) { int ierr, rank, size; ierr = MPI_Init(&argc, &argv); ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); ierr = MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Barrier(MPI_COMM_WORLD); Py_Initialize(); PyRun_SimpleString(helloworld); Py_Finalize(); MPI_Barrier(MPI_COMM_WORLD); if (rank == 0) { printf("\n"); fflush(stdout); fflush(stderr); } MPI_Barrier(MPI_COMM_WORLD); Py_Initialize(); PyRun_SimpleString(helloworld); Py_Finalize(); MPI_Barrier(MPI_COMM_WORLD); ierr = MPI_Finalize(); return 0; }
/* * You can use safely use mpi4py between multiple * Py_Initialize()/Py_Finalize() calls ... * but do not blame me for the memory leaks ;-) * */ #include <mpi.h> #include <Python.h> const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" "myrank = MPI.COMM_WORLD.Get_rank() \n" "nprocs = MPI.COMM_WORLD.Get_size() \n" "procnm = MPI.Get_processor_name() \n" "print (hwmess % (myrank, nprocs, procnm)) \n" ""; int main(int argc, char *argv[]) { int i,n=5; MPI_Init(&argc, &argv); for (i=0; i<n; i++) { Py_Initialize(); PyRun_SimpleString(helloworld); Py_Finalize(); } MPI_Finalize(); return 0; }
Update and simplify embedding demo
Update and simplify embedding demo
C
bsd-2-clause
pressel/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py
c3aad0461ff755aaf50dc5c734f362fc488b6d31
utility.h
utility.h
#pragma once namespace mmh { template <typename Size, typename Object> constexpr Size sizeof_t() { return gsl::narrow<Size>(sizeof Object); } template <typename Size, typename Value> constexpr Size sizeof_t(const Value& value) { return gsl::narrow<Size>(sizeof value); } } // namespace mmh
#pragma once namespace mmh { template <typename Size, typename Object> constexpr Size sizeof_t() { return gsl::narrow<Size>(sizeof(Object)); } template <typename Size, typename Value> constexpr Size sizeof_t(const Value& value) { return gsl::narrow<Size>(sizeof value); } } // namespace mmh
Add missing brackets needed for Clang
Add missing brackets needed for Clang
C
bsd-3-clause
reupen/mmh,reupen/mmh
2953f13d4dd38f06ae52ff09532bc2e401c46738
src/main.c
src/main.c
#include <pebble.h> #include "pebcessing/pebcessing.h" static Window *window = NULL; static void init(void) { window = window_create(); window_set_fullscreen(window, true); window_stack_push(window, true); } static void deinit(void) { window_destroy(window); } int main(void) { init(); init_pebcessing(window, window_get_root_layer(window)); app_event_loop(); deinit_pebcessing(); deinit(); return 0; }
#include <pebble.h> #include "pebcessing/pebcessing.h" static Window *window = NULL; static void init(void) { window = window_create(); // Make the window fullscreen. // All Windows are fullscreen-only on the Basalt platform. #ifdef PBL_PLATFORM_APLITE window_set_fullscreen(window, true); #endif window_stack_push(window, true); } static void deinit(void) { window_destroy(window); } int main(void) { init(); init_pebcessing(window, window_get_root_layer(window)); app_event_loop(); deinit_pebcessing(); deinit(); return 0; }
Change so that window_set_fullscreen() is called only on the Aplite platform
Change so that window_set_fullscreen() is called only on the Aplite platform
C
mit
hikoLab/pebcessing,hikoLab/pebcessing,itosue/pebcessing,itosue/pebcessing,hikoLab/pebcessing,itosue/pebcessing
fe59f3886ddc97f26e2bbad5039302aa7061a918
include/skbuff.h
include/skbuff.h
#ifndef SKBUFF_H_ #define SKBUFF_H_ #include "netdev.h" #include "dst.h" #include "list.h" #include <pthread.h> struct sk_buff { struct list_head list; struct dst_entry *dst; struct netdev *netdev; uint16_t protocol; uint32_t len; uint8_t *tail; uint8_t *end; uint8_t *head; uint8_t *data; }; struct sk_buff_head { struct list_head head; uint32_t qlen; pthread_mutex_t lock; }; struct sk_buff *alloc_skb(unsigned int size); void free_skb(struct sk_buff *skb); uint8_t *skb_push(struct sk_buff *skb, unsigned int len); uint8_t *skb_head(struct sk_buff *skb); void *skb_reserve(struct sk_buff *skb, unsigned int len); void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst); static inline void skb_queue_init(struct sk_buff_head *list) { list_init(&list->head); list->qlen = 0; pthread_mutex_init(&list->lock, NULL); } #endif
#ifndef SKBUFF_H_ #define SKBUFF_H_ #include "netdev.h" #include "dst.h" #include "list.h" #include <pthread.h> struct sk_buff { struct list_head list; struct dst_entry *dst; struct netdev *netdev; uint16_t protocol; uint32_t len; uint8_t *tail; uint8_t *end; uint8_t *head; uint8_t *data; }; struct sk_buff_head { struct list_head head; uint32_t qlen; pthread_mutex_t lock; }; struct sk_buff *alloc_skb(unsigned int size); void free_skb(struct sk_buff *skb); uint8_t *skb_push(struct sk_buff *skb, unsigned int len); uint8_t *skb_head(struct sk_buff *skb); void *skb_reserve(struct sk_buff *skb, unsigned int len); void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst); static inline uint32_t skb_queue_len(const struct sk_buff_head *list) { return list->qlen; } static inline void skb_queue_init(struct sk_buff_head *list) { list_init(&list->head); list->qlen = 0; pthread_mutex_init(&list->lock, NULL); } #endif
Add skb queue length getter
Add skb queue length getter
C
mit
saminiir/level-ip,saminiir/level-ip
122f9363682e5de8ce4056c4c05c1eaf8935cf19
src/libstddjb/cdb_free.c
src/libstddjb/cdb_free.c
/* ISC license. */ #include <sys/mman.h> #include <skalibs/cdb.h> extern void cdb_free (struct cdb *c) { if (c->map) munmap(c->map, c->size) ; *c = cdb_zero ; }
/* ISC license. */ #include <sys/mman.h> #include <errno.h> #include <skalibs/cdb.h> extern void cdb_free (struct cdb *c) { if (c->map) { int e = errno ; munmap(c->map, c->size) ; errno = e ; } *c = cdb_zero ; }
Save errno when freeing a cdb
Save errno when freeing a cdb Signed-off-by: Laurent Bercot <3aa9adbbb49a4d5ab9c798d5e366f54570870800@appnovation.com>
C
isc
skarnet/skalibs,skarnet/skalibs
47cb8d841569225b3e8e33945313709f964bd932
src/drivers/tty/serial/ttys_oldfs.h
src/drivers/tty/serial/ttys_oldfs.h
/** * @file * * @date 21.04.2016 * @author Anton Bondarev */ #ifndef TTYS_H_ #define TTYS_H_ #include <fs/idesc.h> #include <drivers/tty.h> struct uart; struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; #endif /* TTYS_H_ */
/** * @file * * @date 21.04.2016 * @author Anton Bondarev */ #ifndef TTYS_H_ #define TTYS_H_ #include <fs/idesc.h> #include <drivers/tty.h> #include <drivers/char_dev.h> struct uart; struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; extern struct idesc *uart_cdev_open(struct dev_module *cdev, void *priv); #define TTYS_DEF(name, uart) \ CHAR_DEV_DEF(name, uart_cdev_open, NULL, NULL, uart) #endif /* TTYS_H_ */
Add TTYS_DEF macro to oldfs
drivers: Add TTYS_DEF macro to oldfs
C
bsd-2-clause
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
da633160262800462ebda14807cffbb23fc68b29
src/condor_syscall_lib/syscall_param_sizes.h
src/condor_syscall_lib/syscall_param_sizes.h
#define STAT_SIZE sizeof(struct stat) #define STATFS_SIZE sizeof(struct statfs) #define GID_T_SIZE sizeof(gid_t) #define INT_SIZE sizeof(int) #define LONG_SIZE sizeof(long) #define FD_SET_SIZE sizeof(fd_set) #define TIMEVAL_SIZE sizeof(struct timeval) #define TIMEVAL_ARRAY_SIZE (sizeof(struct timeval) * 2) #define TIMEZONE_SIZE sizeof(struct timezone) #define FILEDES_SIZE sizeof(struct filedes) #define RLIMIT_SIZE sizeof(struct rlimit) #define UTSNAME_SIZE sizeof(struct utsname) #define POLLFD_SIZE sizeof(struct pollfd) #define RUSAGE_SIZE sizeof(struct rusage) #define MAX_STRING 1024 #define EIGHT 8 #define STATFS_ARRAY_SIZE (rval * sizeof(struct statfs)) #define PROC_SIZE sizeof(PROC)
#define STAT_SIZE sizeof(struct stat) #define STATFS_SIZE sizeof(struct statfs) #define GID_T_SIZE sizeof(gid_t) #define INT_SIZE sizeof(int) #define LONG_SIZE sizeof(long) #define FD_SET_SIZE sizeof(fd_set) #define TIMEVAL_SIZE sizeof(struct timeval) #define TIMEVAL_ARRAY_SIZE (sizeof(struct timeval) * 2) #define TIMEZONE_SIZE sizeof(struct timezone) #define FILEDES_SIZE sizeof(struct filedes) #define RLIMIT_SIZE sizeof(struct rlimit) #define UTSNAME_SIZE sizeof(struct utsname) #define POLLFD_SIZE sizeof(struct pollfd) #define RUSAGE_SIZE sizeof(struct rusage) #define MAX_STRING 1024 #define EIGHT 8 #define STATFS_ARRAY_SIZE (rval * sizeof(struct statfs)) #define PROC_SIZE sizeof(PROC) #define SIZE_T_SIZE sizeof(size_t) #define U_SHORT_SIZE sizeof(u_short)
Add macros for sized of "size_t" and "u_short".
Add macros for sized of "size_t" and "u_short".
C
apache-2.0
bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,htcondor/htcondor,htcondor/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,neurodebian/htcondor,htcondor/htcondor,djw8605/condor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,neurodebian/htcondor,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/condor,zhangzhehust/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/condor,djw8605/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/htcondor,zhangzhehust/htcondor,htcondor/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,htcondor/htcondor,neurodebian/htcondor,djw8605/condor,djw8605/condor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/condor,djw8605/htcondor,clalancette/condor-dcloud,djw8605/htcondor
c47c472d169e5dd2eeadfddb48ac71c114e29559
src/tuple.h
src/tuple.h
/* * tuple.h - define data structure for tuples */ #ifndef _TUPLE_H_ #define _TUPLE_H_ #define MAX_TUPLE_SIZE 4096 union Tuple { unsigned char bytes[MAX_TUPLE_SIZE]; char *ptrs[MAX_TUPLE_SIZE/sizeof(char *)]; }; #endif /* _TUPLE_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. */ /* * tuple.h - define data structure for tuples */ #ifndef _TUPLE_H_ #define _TUPLE_H_ #define MAX_TUPLE_SIZE 4096 union Tuple { unsigned char bytes[MAX_TUPLE_SIZE]; char *ptrs[MAX_TUPLE_SIZE/sizeof(char *)]; }; #endif /* _TUPLE_H_ */
Add BSD 3-clause open source header
Add BSD 3-clause open source header
C
bsd-3-clause
fergul/Cache,jsventek/Cache,fergul/Cache,fergul/Cache,jsventek/Cache,jsventek/Cache
849dcc2fd36ec01352a3544c501cbbe5afa78d95
src/empathy-accounts-module.c
src/empathy-accounts-module.c
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Collabora Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <config.h> #include <glib.h> #include <glib/gi18n-lib.h> #include <gmodule.h> #include <gio/gio.h> #include "cc-empathy-accounts-panel.h" void g_io_module_load (GIOModule *module) { textdomain (GETTEXT_PACKAGE); cc_empathy_accounts_panel_register (module); } void g_io_module_unload (GIOModule *module) { }
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Collabora Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <config.h> #include <glib.h> #include <glib/gi18n-lib.h> #include <gmodule.h> #include <gio/gio.h> #include "cc-empathy-accounts-panel.h" void g_io_module_load (GIOModule *module) { cc_empathy_accounts_panel_register (module); } void g_io_module_unload (GIOModule *module) { }
Remove call to textdomain ()
accounts-module: Remove call to textdomain () This shouldn't be called in shared module. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=617262
C
lgpl-2.1
GNOME/telepathy-account-widgets,Distrotech/telepathy-account-widgets,Distrotech/telepathy-account-widgets,GNOME/telepathy-account-widgets,GNOME/telepathy-account-widgets
2f376c9b25a8654b508613ddd57851c015f14858
hipify-clang/src/CUDA2HipMap.h
hipify-clang/src/CUDA2HipMap.h
#pragma once #include "llvm/ADT/StringRef.h" #include <set> #include <map> #include "Types.h" // TODO: This shouldn't really be here. More restructuring needed... struct hipCounter { llvm::StringRef hipName; ConvTypes countType; ApiTypes countApiType; int unsupported; }; #define HIP_UNSUPPORTED -1 /// Macros to ignore. extern const std::set<llvm::StringRef> CUDA_EXCLUDES; /// Maps cuda header names to hip header names. extern const std::map<llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP; /// Maps the names of CUDA types to the corresponding hip types. extern const std::map<llvm::StringRef, hipCounter> CUDA_TYPE_NAME_MAP; /// Map all other CUDA identifiers (function/macro names, enum values) to hip versions. extern const std::map<llvm::StringRef, hipCounter> CUDA_IDENTIFIER_MAP; /** * The union of all the above maps. * * This should be used rarely, but is still needed to convert macro definitions (which can * contain any combination of the above things). AST walkers can usually get away with just * looking in the lookup table for the type of element they are processing, however, saving * a great deal of time. */ const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP();
#pragma once #include "llvm/ADT/StringRef.h" #include <set> #include <map> #include "Types.h" // TODO: This shouldn't really be here. More restructuring needed... struct hipCounter { llvm::StringRef hipName; ConvTypes countType; ApiTypes countApiType; bool unsupported; }; #define HIP_UNSUPPORTED true /// Macros to ignore. extern const std::set<llvm::StringRef> CUDA_EXCLUDES; /// Maps cuda header names to hip header names. extern const std::map<llvm::StringRef, hipCounter> CUDA_INCLUDE_MAP; /// Maps the names of CUDA types to the corresponding hip types. extern const std::map<llvm::StringRef, hipCounter> CUDA_TYPE_NAME_MAP; /// Map all other CUDA identifiers (function/macro names, enum values) to hip versions. extern const std::map<llvm::StringRef, hipCounter> CUDA_IDENTIFIER_MAP; /** * The union of all the above maps. * * This should be used rarely, but is still needed to convert macro definitions (which can * contain any combination of the above things). AST walkers can usually get away with just * looking in the lookup table for the type of element they are processing, however, saving * a great deal of time. */ const std::map<llvm::StringRef, hipCounter>& CUDA_RENAMES_MAP();
Make `unsupported` actually be a bool...
Make `unsupported` actually be a bool...
C
mit
ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP
1ffa2c93463833e800dbac2a5fed09cabdb0da1c
tools/sleep.c
tools/sleep.c
// Title: sleep // Name: sleep.c // Author: Matayoshi // Date: 2010/06/20 // Ver: 1.0.0 #include <stdio.h> #include <stdlib.h> #include <windows.h> int main(int argc, char* argv[]) { // `FbN if(argc < 2) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } else { char buf[16]; int wait = 0; // 񂩂琔lɕϊ sscanf(argv[1], "%15c", buf); if(sscanf(buf, "%d", &wait) != 1) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } // Ŏw肳ꂽ msec sleep(wait) Sleep(wait); } return 0; }
// Title: sleep // Name: sleep.c // Author: Matayoshi // Date: 2010/06/20 // Ver: 1.0.0 #include <stdio.h> #include <stdlib.h> #include <windows.h> int main(int argc, char* argv[]) { // 引数チェック if(argc < 2) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } else { char buf[16]; int wait = 0; // 文字列から数値に変換 sscanf(argv[1], "%15c", buf); if(sscanf(buf, "%d", &wait) != 1) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } // 引数で指定された msec だけ sleep(wait) Sleep(wait); } return 0; }
Change character encoding.(Shift_JIS -> UTF-8)
Change character encoding.(Shift_JIS -> UTF-8)
C
bsd-2-clause
matayoshi/tools
7334efa66bcbcd6bfd95cb9c4d3236a9a469daf1
libutils/include/utils/force.h
libutils/include/utils/force.h
/* * Copyright 2016, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #pragma once /* macros for forcing the compiler to leave in statments it would * normally optimize away */ #include <utils/attribute.h> #include <utils/stringify.h> /* Macro for doing dummy reads * * Expands to a volatile, unused variable which is set to the value at * a given address. It's volatile to prevent the compiler optimizing * away a variable that is written but never read, and it's unused to * prevent warnings about a variable that's never read. */ #define FORCE_READ(address) \ volatile UNUSED typeof(*address) JOIN(__force__read, __COUNTER__) = *(address)
/* * Copyright 2016, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #pragma once /* macros for forcing the compiler to leave in statments it would * normally optimize away */ #include <utils/attribute.h> #include <utils/stringify.h> /* Macro for doing dummy reads * * Forces a memory read access to the given address. */ #define FORCE_READ(address) \ do { \ typeof(*(address)) *_ptr = (address); \ asm volatile ("" : "=m"(*_ptr) : "r"(*_ptr)); \ } while (0)
Rephrase FORCE_READ into something safer.
libutils: Rephrase FORCE_READ into something safer. This commit rephrases the `FORCE_READ` macro to avoid an unorthodox use of `volatile`. The change makes the read less malleable from the compiler's point of view. It also has the unintended side effect of slightly optimising this operation. On x86, an optimising compiler now generates a single load, rather than a load followed by a store to the (unused) local variable. On ARM, there is a similar improvement, but we also save two instructions for stack pointer manipulation depending on the context in which the macro is expanded.
C
bsd-2-clause
agacek/util_libs,agacek/util_libs,agacek/util_libs,agacek/util_libs
90d4efa6094d0af71afbede10293b30e065e27bf
test/PCH/changed-files.c
test/PCH/changed-files.c
const char *s0 = m0; int s1 = m1; const char *s2 = m0; // FIXME: This test fails inexplicably on Windows in a manner that makes it // look like standard error isn't getting flushed properly. // RUN: true // RUNx: echo '#define m0 ""' > %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr // RUNx: echo '#define m0 000' > %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr // RUNx: echo '#define m0 000' > %t.h // RUNx: echo "#define m1 'abcd'" >> %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr
const char *s0 = m0; int s1 = m1; const char *s2 = m0; // FIXME: This test fails inexplicably on Windows in a manner that makes it // look like standard error isn't getting flushed properly. // RUN: false // XFAIL: * // RUN: echo '#define m0 ""' > %t.h // RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUN: echo '' > %t.h // RUN: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUN: grep "modified" %t.stderr // RUN: echo '#define m0 000' > %t.h // RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUN: echo '' > %t.h // RUN: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUN: grep "modified" %t.stderr // RUN: echo '#define m0 000' > %t.h // RUN: echo "#define m1 'abcd'" >> %t.h // RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUN: echo '' > %t.h // RUN: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUN: grep "modified" %t.stderr
Use Daniel's trick for XFAIL'd tests
Use Daniel's trick for XFAIL'd tests git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99515 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang
94a4b6a3f8de8f9dcd11e3fecacb3444785e6087
src/Draupnir.h
src/Draupnir.h
#ifndef DRAUPNIR_H__ #define DRAUPNIR_H__ #include <cstdint> #include "Sponge.h" #include "CrcSponge.h" #include "CrcSpongeBuilder.h" #include "Constants.h" namespace Draupnir { // utility typedefs typedef CrcSponge<std::uint64_t> CrcSponge64; typedef CrcSponge<std::uint32_t> CrcSponge32; typedef CrcSponge<std::uint16_t> CrcSponge16; typedef CrcSponge<std::uint8_t> CrcSponge8; typedef CrcSpongeBuilder<std::uint64_t> CrcSponge64Builder; typedef CrcSpongeBuilder<std::uint32_t> CrcSponge32Builder; typedef CrcSpongeBuilder<std::uint16_t> CrcSponge16Builder; typedef CrcSpongeBuilder<std::uint8_t> CrcSponge8Builder; } #endif /* DRAUPNIR_H__ */
#ifndef DRAUPNIR_H__ #define DRAUPNIR_H__ #include <cstdint> #include "Sponge.h" #include "CrcSponge.h" #include "CrcSpongeBuilder.h" #include "Constants.h" namespace Draupnir { // utility typedefs using CrcSponge64 = CrcSponge<std::uint64_t>; using CrcSponge32 = CrcSponge<std::uint32_t>; using CrcSponge16 = CrcSponge<std::uint16_t>; using CrcSponge8 = CrcSponge<std::uint8_t >; using CrcSponge64Builder = CrcSpongeBuilder<std::uint64_t>; using CrcSponge32Builder = CrcSpongeBuilder<std::uint32_t>; using CrcSponge16Builder = CrcSpongeBuilder<std::uint16_t>; using CrcSponge8Builder = CrcSpongeBuilder<std::uint8_t >; } #endif /* DRAUPNIR_H__ */
Use using instead of typedef
Use using instead of typedef
C
agpl-3.0
mariano-perez-rodriguez/draupnir
212e2ca79c73f0997e06a351f63691d3f2976c15
tests/regression/10-synch/24-tid-partitioned-array-global.c
tests/regression/10-synch/24-tid-partitioned-array-global.c
// PARAM: --enable exp.partition-arrays.enabled #include <pthread.h> pthread_t t_ids[10000]; void *t_fun(void *arg) { return NULL; } int main(void) { for (int i = 0; i < 10000; i++) pthread_create(&t_ids[i], NULL, t_fun, NULL); for (int i = 0; i < 10000; i++) pthread_join (t_ids[i], NULL); return 0; }
// PARAM: --set ana.activated[+] thread --enable exp.partition-arrays.enabled #include <pthread.h> pthread_t t_ids[10000]; void *t_fun(void *arg) { return NULL; } int main(void) { for (int i = 0; i < 10000; i++) pthread_create(&t_ids[i], NULL, t_fun, NULL); for (int i = 0; i < 10000; i++) pthread_join (t_ids[i], NULL); return 0; }
Fix missing thread analysis in 10/24
Fix missing thread analysis in 10/24
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
23f2dfdefaab0c052c7c1695e53331a7992df5b9
include-fixer/find-all-symbols/STLPostfixHeaderMap.h
include-fixer/find-all-symbols/STLPostfixHeaderMap.h
//===-- STLPostfixHeaderMap.h - hardcoded header map for STL ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #include <HeaderMapCollector.h> namespace clang { namespace find_all_symbols { const HeaderMapCollector::HeaderMap* getSTLPostfixHeaderMap(); } // namespace find_all_symbols } // namespace clang #endif // LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H
//===-- STLPostfixHeaderMap.h - hardcoded header map for STL ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #include "HeaderMapCollector.h" namespace clang { namespace find_all_symbols { const HeaderMapCollector::HeaderMap* getSTLPostfixHeaderMap(); } // namespace find_all_symbols } // namespace clang #endif // LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H
Include local header with quotes instead of angle brackets.
Include local header with quotes instead of angle brackets. This works by accident because we pass '-I.' git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@270701 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
1ca440467863ff2daa0234b36401706872391e6a
src/clientversion.h
src/clientversion.h
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source #define COPYRIGHT_YEAR 2014 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 1 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source #define COPYRIGHT_YEAR 2014 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H
Bump version for openssl security updates
Bump version for openssl security updates
C
mit
CatcoinOfficial/CatcoinRelease,CatcoinOfficial/CatcoinRelease,CatcoinOfficial/CatcoinRelease,CatcoinOfficial/CatcoinRelease,CatcoinOfficial/CatcoinRelease
724948b4d891a91e2912497c1a3e544543b501b1
src/mongoc/mongoc-iovec.h
src/mongoc/mongoc-iovec.h
/* * Copyright 2014 MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MONGOC_IOVEC_H #define MONGOC_IOVEC_H #include <bson.h> #ifndef _WIN32 # include <sys/uio.h> #endif BSON_BEGIN_DECLS #ifdef _WIN32 typedef struct { u_long iov_len; char *iov_base; } mongoc_iovec_t; #else typedef struct iovec mongoc_iovec_t; #endif BSON_END_DECLS #endif /* MONGOC_IOVEC_H */
/* * Copyright 2014 MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MONGOC_IOVEC_H #define MONGOC_IOVEC_H #include <bson.h> #ifdef _WIN32 # include <stddef.h> #else # include <sys/uio.h> #endif BSON_BEGIN_DECLS #ifdef _WIN32 typedef struct { u_long iov_len; char *iov_base; } mongoc_iovec_t; BSON_STATIC_ASSERT(sizeof(mongoc_iovec_t) == sizeof(WSABUF)); BSON_STATIC_ASSERT(offsetof(mongoc_iovec_t, iov_base) == offsetof(WSABUF, buf)); BSON_STATIC_ASSERT(offsetof(mongoc_iovec_t, iov_len) == offsetof(WSABUF, len)); #else typedef struct iovec mongoc_iovec_t; #endif BSON_END_DECLS #endif /* MONGOC_IOVEC_H */
Make sure our iovec abstraction is compatible with Windows WSABUF
CDRIVER-756: Make sure our iovec abstraction is compatible with Windows WSABUF We cast mongoc_iovec_t to LPWSABUF in our sendmsg() wrapper
C
apache-2.0
ajdavis/mongo-c-driver,rcsanchez97/mongo-c-driver,acmorrow/mongo-c-driver,ajdavis/mongo-c-driver,rcsanchez97/mongo-c-driver,derickr/mongo-c-driver,christopherjwang/mongo-c-driver,christopherjwang/mongo-c-driver,jmikola/mongo-c-driver,derickr/mongo-c-driver,jmikola/mongo-c-driver,acmorrow/mongo-c-driver,beingmeta/mongo-c-driver,derickr/mongo-c-driver,remicollet/mongo-c-driver,malexzx/mongo-c-driver,mongodb/mongo-c-driver,rcsanchez97/mongo-c-driver,derickr/mongo-c-driver,mschoenlaub/mongo-c-driver,ksuarz/mongo-c-driver,remicollet/mongo-c-driver,remicollet/mongo-c-driver,jmikola/mongo-c-driver,ac000/mongo-c-driver,acmorrow/mongo-c-driver,ksuarz/mongo-c-driver,rcsanchez97/mongo-c-driver,derickr/mongo-c-driver,acmorrow/mongo-c-driver,ajdavis/mongo-c-driver,ac000/mongo-c-driver,bjori/mongo-c-driver,beingmeta/mongo-c-driver,ajdavis/mongo-c-driver,bjori/mongo-c-driver,beingmeta/mongo-c-driver,Convey-Compliance/mongo-c-driver,ajdavis/mongo-c-driver,beingmeta/mongo-c-driver,acmorrow/mongo-c-driver,rcsanchez97/mongo-c-driver,jmikola/mongo-c-driver,Machyne/mongo-c-driver,bjori/mongo-c-driver,remicollet/mongo-c-driver,Machyne/mongo-c-driver,malexzx/mongo-c-driver,beingmeta/mongo-c-driver,Convey-Compliance/mongo-c-driver,rcsanchez97/mongo-c-driver,u2yg/mongo-c-driver,mongodb/mongo-c-driver,bjori/mongo-c-driver,Convey-Compliance/mongo-c-driver,remicollet/mongo-c-driver,mongodb/mongo-c-driver,ajdavis/mongo-c-driver,ksuarz/mongo-c-driver,ksuarz/mongo-c-driver,Convey-Compliance/mongo-c-driver,beingmeta/mongo-c-driver,mschoenlaub/mongo-c-driver,bjori/mongo-c-driver,christopherjwang/mongo-c-driver,u2yg/mongo-c-driver,mschoenlaub/mongo-c-driver,jmikola/mongo-c-driver,Machyne/mongo-c-driver,derickr/mongo-c-driver,remicollet/mongo-c-driver,u2yg/mongo-c-driver,mongodb/mongo-c-driver,mongodb/mongo-c-driver,acmorrow/mongo-c-driver,rcsanchez97/mongo-c-driver,bjori/mongo-c-driver,ac000/mongo-c-driver,derickr/mongo-c-driver,u2yg/mongo-c-driver,mongodb/mongo-c-driver,malexzx/mongo-c-driver,bjori/mongo-c-driver,mschoenlaub/mongo-c-driver,malexzx/mongo-c-driver,Convey-Compliance/mongo-c-driver,remicollet/mongo-c-driver,ajdavis/mongo-c-driver,jmikola/mongo-c-driver,beingmeta/mongo-c-driver,Machyne/mongo-c-driver,acmorrow/mongo-c-driver,mongodb/mongo-c-driver,beingmeta/mongo-c-driver,christopherjwang/mongo-c-driver,jmikola/mongo-c-driver
f639faedd1daf285559fea44fc00190a668cec32
src2/BeaconMapper.h
src2/BeaconMapper.h
// // Created by Scott Stark on 6/12/15. // #ifndef NATIVESCANNER_BEACONMAPPER_H #define NATIVESCANNER_BEACONMAPPER_H #include <map> #include <string> using namespace std; /** * Map a beacon id to the registered user by querying the application registration rest api */ class BeaconMapper { private: map<int, string> beaconToUser; public: /** * Query the current user registrations to update the beacon minorID to name mappings */ void refresh(); string lookupUser(int minorID); }; #endif //NATIVESCANNER_BEACONMAPPER_H
// // Created by Scott Stark on 6/12/15. // #ifndef NATIVESCANNER_BEACONMAPPER_H #define NATIVESCANNER_BEACONMAPPER_H #include <map> #include <string> using namespace std; /** * Map a beacon id to the registered user by querying the application registration rest api * * Relies on: * git clone https://github.com/open-source-parsers/jsoncpp.git * cd jsoncpp/ * mkdir build * cd build/ * cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_STATIC_LIBS=ON .. * make * make install * * git clone https://github.com/mrtazz/restclient-cpp.git * apt-get install autoconf * apt-get install libtool * apt-get install libcurl4-openssl-dev * cd restclient-cpp/ * ./autogen.sh * ./configure * make * make install */ class BeaconMapper { private: map<int, string> beaconToUser; public: /** * Query the current user registrations to update the beacon minorID to name mappings */ void refresh(); string lookupUser(int minorID); }; #endif //NATIVESCANNER_BEACONMAPPER_H
Document full requirements for the beacon mapper
Document full requirements for the beacon mapper
C
apache-2.0
starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser
69ec185fd5de8c133808a5aeec5b0435a3d2025e
RNSketch/RNSketchManager.h
RNSketch/RNSketchManager.h
// // RNSketchManager.m // RNSketch // // Created by Jeremy Grancher on 28/04/2016. // Copyright © 2016 Jeremy Grancher. All rights reserved. // #import "RCTViewManager.h" #import "RNSketch.h" @interface RNSketchManager : RCTViewManager @property (strong) RNSketch *sketchView; @end;
// // RNSketchManager.m // RNSketch // // Created by Jeremy Grancher on 28/04/2016. // Copyright © 2016 Jeremy Grancher. All rights reserved. // #if __has_include(<React/RCTViewManager.h>) // React Native >= 0.40 #import <React/RCTViewManager.h> #else // React Native <= 0.39 #import "RCTViewManager.h" #endif #import "RNSketch.h" @interface RNSketchManager : RCTViewManager @property (strong) RNSketch *sketchView; @end;
Support RN 0.40 headers while retaining backwards compatibility.
Support RN 0.40 headers while retaining backwards compatibility. Use #if to conditionally import React headers.
C
mit
jgrancher/react-native-sketch
37429be0d50a7a8d9b5ea34346613410a89c8c53
Reducers/REDIterable.h
Reducers/REDIterable.h
// Copyright (c) 2014 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> @protocol REDIterable <NSObject> @property (readonly) id(^red_iterator)(void); @end
// Copyright (c) 2014 Rob Rix. All rights reserved. #import <Foundation/Foundation.h> /// A nullary block iterating the elements of a collection over successive calls. /// /// \return The next object in the collection, or nil if it has iterated the entire collection. typedef id (^REDIteratingBlock)(void); /// A collection which can be iterated. @protocol REDIterable <NSObject> /// An iterator for this collection. @property (readonly) REDIteratingBlock red_iterator; @end
Add a typedef for iterators.
Add a typedef for iterators.
C
mit
policp/Reducers,robrix/Reducers
d086430fdd5b4cf3cc168b794ac823629994fc18
test/pragma/both.c
test/pragma/both.c
// RUN: %check %s #pragma STDC FENV_ACCESS on _Pragma("STDC FENV_ACCESS on"); // CHECK: warning: unhandled STDC pragma // CHECK: ^warning: extra ';' at global scope #define LISTING(x) PRAGMA(listing on #x) #define PRAGMA(x) _Pragma(#x) LISTING(../listing) // CHECK: warning: unknown pragma 'listing on "../listing"' _Pragma(L"STDC CX_LIMITED_RANGE off") // CHECK: warning: unhandled STDC pragma // CHECK: ^!/warning: extra ';'/ #pragma STDC FP_CONTRACT off main() { }
// RUN: %check %s #pragma STDC FENV_ACCESS ON _Pragma("STDC FENV_ACCESS ON"); // CHECK: warning: unhandled STDC pragma // CHECK: ^warning: extra ';' at global scope #define LISTING(x) PRAGMA(listing on #x) #define PRAGMA(x) _Pragma(#x) LISTING(../listing) // CHECK: warning: unknown pragma 'listing on "../listing"' _Pragma(L"STDC CX_LIMITED_RANGE OFF") // CHECK: warning: unhandled STDC pragma // CHECK: ^!/warning: extra ';'/ #pragma STDC FP_CONTRACT OFF int main() { }
Correct case of STDC pragmas
Correct case of STDC pragmas
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
e43162ceeb46ef215c9a5215b36b01f695eca60e
ios/KCKeepAwake.h
ios/KCKeepAwake.h
#import "RCTBridgeModule.h" @interface KCKeepAwake : NSObject <RCTBridgeModule> @end
#import <React/RCTBridgeModule.h> @interface KCKeepAwake : NSObject <RCTBridgeModule> @end
Correct import path to match RN 0.40
Correct import path to match RN 0.40
C
mit
corbt/react-native-keep-awake,corbt/react-native-keep-awake,corbt/react-native-keep-awake
2d6cf0686fb211408a6f5ed96ac5341f1c486aaa
kremlib/kremstr.c
kremlib/kremstr.c
#include "kremlib.h" #include "kremstr.h" /******************************************************************************/ /* Implementation of FStar.String and FStar.HyperIO */ /******************************************************************************/ /* FStar.h is generally kept for the program we wish to compile, meaning that * FStar.h contains extern declarations for the functions below. This provides * their implementation, and since the function prototypes are already in * FStar.h, we don't need to put these in the header, they will be resolved at * link-time. */ Prims_nat FStar_String_strlen(Prims_string s) { return strlen(s); } Prims_string FStar_String_strcat(Prims_string s0, Prims_string s1) { char *dest = calloc(strlen(s0) + strlen(s1) + 1, 1); strcat(dest, s0); strcat(dest, s1); return (Prims_string)dest; } Prims_string Prims_strcat(Prims_string s0, Prims_string s1) { return FStar_String_strcat(s0, s1); } void FStar_IO_debug_print_string(Prims_string s) { printf("%s", s); } bool __eq__Prims_string(Prims_string s1, Prims_string s2) { return (strcmp(s1, s2) == 0); }
#include "kremlib.h" #include "kremstr.h" /******************************************************************************/ /* Implementation of FStar.String and FStar.HyperIO */ /******************************************************************************/ /* FStar.h is generally kept for the program we wish to compile, meaning that * FStar.h contains extern declarations for the functions below. This provides * their implementation, and since the function prototypes are already in * FStar.h, we don't need to put these in the header, they will be resolved at * link-time. */ Prims_nat FStar_String_strlen(Prims_string s) { return strlen(s); } Prims_string FStar_String_strcat(Prims_string s0, Prims_string s1) { char *dest = calloc(strlen(s0) + strlen(s1) + 1, 1); strcat(dest, s0); strcat(dest, s1); return (Prims_string)dest; } Prims_string Prims_strcat(Prims_string s0, Prims_string s1) { return FStar_String_strcat(s0, s1); } void FStar_HyperStack_IO_print_string(Prims_string s) { printf("%s", s); } void FStar_IO_debug_print_string(Prims_string s) { printf("%s", s); } bool __eq__Prims_string(Prims_string s1, Prims_string s2) { return (strcmp(s1, s2) == 0); }
Revert "Try to catch up on upstream F* changes"
Revert "Try to catch up on upstream F* changes" This reverts commit 5b09f1f43b155df40caa8d8716075ccd7d08af26.
C
apache-2.0
FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin,FStarLang/kremlin
57ca28bb8d019266a16ff18a87d71f12b59224b5
src/exercise112.c
src/exercise112.c
/* * A solution to Exercise 1-12 in The C Programming Language (Second Edition). * * This file was written by Damien Dart <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(void) { int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { if ((character == ' ') || (character == '\t')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true; } } else { putchar(character); in_whitespace = false; } } return EXIT_SUCCESS; }
/* * A solution to Exercise 1-12 in The C Programming Language (Second Edition). * * This file was written by Damien Dart <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(void) { int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { if ((character == ' ') || (character == '\t' || character == '\n')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true; } } else { putchar(character); in_whitespace = false; } } return EXIT_SUCCESS; }
Fix solution to Exercise 1-12.
Fix solution to Exercise 1-12. Fix solution to Exercise 1-12 so that newline characters are processed correctly.
C
unlicense
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
f4c69c820550a352cb123bfb0b16c33c659a4ca6
src/timezone/pgtz.c
src/timezone/pgtz.c
/*------------------------------------------------------------------------- * * pgtz.c * Timezone Library Integration Functions * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.5 2004/05/01 01:38:53 momjian Exp $ * *------------------------------------------------------------------------- */ #include "pgtz.h" #include "tzfile.h" static char tzdir[MAXPGPATH]; static int done_tzdir = 0; char * pg_TZDIR(void) { char *p; if (done_tzdir) return tzdir; #ifndef WIN32 StrNCpy(tzdir, PGDATADIR, MAXPGPATH); #else if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0) return NULL; #endif canonicalize_path(tzdir); #if 0 if ((p = last_path_separator(tzdir)) == NULL) return NULL; else *p = '\0'; #endif strcat(tzdir, "/timezone"); done_tzdir = 1; return tzdir; }
/*------------------------------------------------------------------------- * * pgtz.c * Timezone Library Integration Functions * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.6 2004/05/01 22:07:03 momjian Exp $ * *------------------------------------------------------------------------- */ #include "pgtz.h" #include "tzfile.h" static char tzdir[MAXPGPATH]; static int done_tzdir = 0; char * pg_TZDIR(void) { char *p; if (done_tzdir) return tzdir; #ifndef WIN32 StrNCpy(tzdir, PGDATADIR, MAXPGPATH); #else if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0) return NULL; #endif canonicalize_path(tzdir); #ifdef WIN32 /* trim off binary name, then go up a directory */ if ((p = last_path_separator(tzdir)) == NULL) return NULL; else *p = '\0'; strcat(tzdir, "/../share/timezone"); #endif strcat(tzdir, "/timezone"); done_tzdir = 1; return tzdir; }
Fix timezone data path for Unix and win32.
Fix timezone data path for Unix and win32.
C
apache-2.0
yuanzhao/gpdb,atris/gpdb,kmjungersen/PostgresXL,zeroae/postgres-xl,yuanzhao/gpdb,jmcatamney/gpdb,50wu/gpdb,yuanzhao/gpdb,rubikloud/gpdb,rvs/gpdb,lpetrov-pivotal/gpdb,techdragon/Postgres-XL,yuanzhao/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,CraigHarris/gpdb,kaknikhil/gpdb,lintzc/gpdb,rubikloud/gpdb,janebeckman/gpdb,lintzc/gpdb,Chibin/gpdb,janebeckman/gpdb,50wu/gpdb,Quikling/gpdb,ashwinstar/gpdb,Postgres-XL/Postgres-XL,foyzur/gpdb,chrishajas/gpdb,cjcjameson/gpdb,janebeckman/gpdb,lintzc/gpdb,foyzur/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,ashwinstar/gpdb,rubikloud/gpdb,atris/gpdb,edespino/gpdb,kaknikhil/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,0x0FFF/gpdb,atris/gpdb,kaknikhil/gpdb,xuegang/gpdb,rvs/gpdb,xinzweb/gpdb,edespino/gpdb,zeroae/postgres-xl,adam8157/gpdb,Postgres-XL/Postgres-XL,xinzweb/gpdb,lpetrov-pivotal/gpdb,foyzur/gpdb,royc1/gpdb,0x0FFF/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,chrishajas/gpdb,jmcatamney/gpdb,arcivanov/postgres-xl,ahachete/gpdb,randomtask1155/gpdb,Quikling/gpdb,royc1/gpdb,xuegang/gpdb,edespino/gpdb,janebeckman/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,xinzweb/gpdb,snaga/postgres-xl,ovr/postgres-xl,ashwinstar/gpdb,chrishajas/gpdb,adam8157/gpdb,xuegang/gpdb,yazun/postgres-xl,tangp3/gpdb,edespino/gpdb,ovr/postgres-xl,edespino/gpdb,atris/gpdb,rvs/gpdb,chrishajas/gpdb,cjcjameson/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,chrishajas/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,pavanvd/postgres-xl,yuanzhao/gpdb,rubikloud/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xuegang/gpdb,ahachete/gpdb,jmcatamney/gpdb,tangp3/gpdb,CraigHarris/gpdb,rubikloud/gpdb,edespino/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,rvs/gpdb,yuanzhao/gpdb,yazun/postgres-xl,ashwinstar/gpdb,zeroae/postgres-xl,Chibin/gpdb,ahachete/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,pavanvd/postgres-xl,lpetrov-pivotal/gpdb,randomtask1155/gpdb,techdragon/Postgres-XL,ovr/postgres-xl,chrishajas/gpdb,greenplum-db/gpdb,adam8157/gpdb,pavanvd/postgres-xl,tpostgres-projects/tPostgres,lpetrov-pivotal/gpdb,chrishajas/gpdb,Quikling/gpdb,CraigHarris/gpdb,yazun/postgres-xl,snaga/postgres-xl,lpetrov-pivotal/gpdb,yazun/postgres-xl,cjcjameson/gpdb,adam8157/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,lintzc/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,adam8157/gpdb,lisakowen/gpdb,Chibin/gpdb,Chibin/gpdb,jmcatamney/gpdb,kmjungersen/PostgresXL,snaga/postgres-xl,techdragon/Postgres-XL,jmcatamney/gpdb,adam8157/gpdb,xinzweb/gpdb,cjcjameson/gpdb,xinzweb/gpdb,edespino/gpdb,edespino/gpdb,lintzc/gpdb,tangp3/gpdb,50wu/gpdb,zaksoup/gpdb,yazun/postgres-xl,Chibin/gpdb,royc1/gpdb,xinzweb/gpdb,xuegang/gpdb,lisakowen/gpdb,chrishajas/gpdb,cjcjameson/gpdb,randomtask1155/gpdb,foyzur/gpdb,ashwinstar/gpdb,royc1/gpdb,foyzur/gpdb,CraigHarris/gpdb,tpostgres-projects/tPostgres,0x0FFF/gpdb,foyzur/gpdb,oberstet/postgres-xl,kaknikhil/gpdb,snaga/postgres-xl,snaga/postgres-xl,randomtask1155/gpdb,kmjungersen/PostgresXL,Quikling/gpdb,ahachete/gpdb,Chibin/gpdb,royc1/gpdb,ovr/postgres-xl,greenplum-db/gpdb,0x0FFF/gpdb,lisakowen/gpdb,zeroae/postgres-xl,Quikling/gpdb,Chibin/gpdb,zaksoup/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,techdragon/Postgres-XL,atris/gpdb,lintzc/gpdb,atris/gpdb,randomtask1155/gpdb,rvs/gpdb,tangp3/gpdb,janebeckman/gpdb,xuegang/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,kaknikhil/gpdb,ahachete/gpdb,xinzweb/gpdb,50wu/gpdb,janebeckman/gpdb,0x0FFF/gpdb,tangp3/gpdb,0x0FFF/gpdb,janebeckman/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,postmind-net/postgres-xl,ahachete/gpdb,lisakowen/gpdb,rvs/gpdb,rubikloud/gpdb,postmind-net/postgres-xl,Quikling/gpdb,arcivanov/postgres-xl,Quikling/gpdb,zaksoup/gpdb,lintzc/gpdb,tangp3/gpdb,jmcatamney/gpdb,tpostgres-projects/tPostgres,50wu/gpdb,zaksoup/gpdb,rvs/gpdb,jmcatamney/gpdb,xuegang/gpdb,greenplum-db/gpdb,tangp3/gpdb,50wu/gpdb,50wu/gpdb,Chibin/gpdb,janebeckman/gpdb,postmind-net/postgres-xl,xuegang/gpdb,janebeckman/gpdb,Quikling/gpdb,oberstet/postgres-xl,tpostgres-projects/tPostgres,ahachete/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,edespino/gpdb,oberstet/postgres-xl,atris/gpdb,kaknikhil/gpdb,rvs/gpdb,cjcjameson/gpdb,lintzc/gpdb,Quikling/gpdb,rubikloud/gpdb,kaknikhil/gpdb,ovr/postgres-xl,ahachete/gpdb,royc1/gpdb,pavanvd/postgres-xl,kaknikhil/gpdb,kaknikhil/gpdb,zaksoup/gpdb,rubikloud/gpdb,Chibin/gpdb,lisakowen/gpdb,oberstet/postgres-xl,cjcjameson/gpdb,foyzur/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,atris/gpdb,yuanzhao/gpdb,zaksoup/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,tangp3/gpdb,arcivanov/postgres-xl,zaksoup/gpdb,adam8157/gpdb,CraigHarris/gpdb,royc1/gpdb,janebeckman/gpdb,rvs/gpdb,xuegang/gpdb,adam8157/gpdb,50wu/gpdb,lintzc/gpdb,lisakowen/gpdb,Postgres-XL/Postgres-XL,yuanzhao/gpdb,royc1/gpdb,postmind-net/postgres-xl,lisakowen/gpdb,foyzur/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb
49c893bd1e9f6e8bd808f517c37aaf053dcbea8b
test/CodeGen/fp128_complex.c
test/CodeGen/fp128_complex.c
// RUN: %clang -target aarch64-linux-gnuabi %s -O3 -S -emit-llvm -o - | FileCheck %s #include <complex.h> complex long double a, b, c, d; void test_fp128_compound_assign(void) { // CHECK: tail call { fp128, fp128 } @__multc3 a *= b; // CHECK: tail call { fp128, fp128 } @__divtc3 c /= d; }
// RUN: %clang -target aarch64-linux-gnuabi %s -O3 -S -emit-llvm -o - | FileCheck %s _Complex long double a, b, c, d; void test_fp128_compound_assign(void) { // CHECK: tail call { fp128, fp128 } @__multc3 a *= b; // CHECK: tail call { fp128, fp128 } @__divtc3 c /= d; }
Remove including <complex.h> in test case, and change to use _Complex instead.
Remove including <complex.h> in test case, and change to use _Complex instead. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220258 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,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,llvm-mirror/clang,apple/swift-clang
5ced8e4fdfa8fd781c0a39b29597762cedcedec6
features/mbedtls/platform/inc/platform_mbed.h
features/mbedtls/platform/inc/platform_mbed.h
/** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(MBEDTLS_CONFIG_HW_SUPPORT) #include "mbedtls_device.h" #endif
/** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(DEVICE_RTC) #define MBEDTLS_HAVE_TIME_DATE #endif #if defined(MBEDTLS_CONFIG_HW_SUPPORT) #include "mbedtls_device.h" #endif
Integrate mbed OS RTC with mbed TLS
Integrate mbed OS RTC with mbed TLS The integration is simply to define the macro MBEDTLS_HAVE_TIME_DATE in the features/mbedtls/platform/inc/platform_mbed.h. The default implementation of the mbedtls_time() function provided by mbed TLS is sufficient to work with mbed OS because both use POSIX functions.
C
apache-2.0
c1728p9/mbed-os,mbedmicro/mbed,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,andcor02/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,kjbracey-arm/mbed,kjbracey-arm/mbed,c1728p9/mbed-os,betzw/mbed-os,c1728p9/mbed-os,andcor02/mbed-os,andcor02/mbed-os,betzw/mbed-os,andcor02/mbed-os,c1728p9/mbed-os,betzw/mbed-os,andcor02/mbed-os,betzw/mbed-os,kjbracey-arm/mbed,betzw/mbed-os,c1728p9/mbed-os,c1728p9/mbed-os
7ab32e65bd6fb6d0cb0c475186fb4e3830f9fa82
cell.h
cell.h
#ifndef CELL_H #define CELL_H #include <map> #include <vector> #include "number.h" class Cell { public: Cell(); explicit Cell(const Cell &rhs); explicit Cell(Cell *value); explicit Cell(bool value); explicit Cell(Number value); explicit Cell(const std::string &value); explicit Cell(const char *value); explicit Cell(const std::vector<Cell> &value); explicit Cell(const std::map<std::string, Cell> &value); Cell &operator=(const Cell &rhs); bool operator==(const Cell &rhs) const; Cell *address_value; bool boolean_value; Number number_value; std::string string_value; std::vector<Cell> array_value; std::map<std::string, Cell> dictionary_value; }; #endif
#ifndef CELL_H #define CELL_H #include <map> #include <vector> #include "number.h" class Cell { public: Cell(); Cell(const Cell &rhs); explicit Cell(Cell *value); explicit Cell(bool value); explicit Cell(Number value); explicit Cell(const std::string &value); explicit Cell(const char *value); explicit Cell(const std::vector<Cell> &value); explicit Cell(const std::map<std::string, Cell> &value); Cell &operator=(const Cell &rhs); bool operator==(const Cell &rhs) const; Cell *address_value; bool boolean_value; Number number_value; std::string string_value; std::vector<Cell> array_value; std::map<std::string, Cell> dictionary_value; }; #endif
Remove 'explicit' on copy constructor
Remove 'explicit' on copy constructor
C
mit
ghewgill/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang,ghewgill/neon-lang,gitlarryf/neon-lang
90209fa8998819f0379546da17e0f739424b8d56
test/testquazip.h
test/testquazip.h
#ifndef QUAZIP_TEST_QUAZIP_H #define QUAZIP_TEST_QUAZIP_H #include <QObject> class TestQuaZip: public QObject { Q_OBJECT private slots: void getFileList_data(); void getFileList(); void getZip(); }; #endif // QUAZIP_TEST_QUAZIP_H
#ifndef QUAZIP_TEST_QUAZIP_H #define QUAZIP_TEST_QUAZIP_H #include <QObject> class TestQuaZip: public QObject { Q_OBJECT private slots: void getFileList_data(); void getFileList(); }; #endif // QUAZIP_TEST_QUAZIP_H
Remove getZip() which got there by mistake
Remove getZip() which got there by mistake git-svn-id: 8ee2d06cc183b55da409a55e9abc82a01a576498@113 bf82bb6f-4128-0410-aed8-a7a134390cb4
C
lgpl-2.1
comargo/QuaZIP,slopjong/QuaZIP,slopjong/QuaZIP,comargo/QuaZIP
349c1d995eeede38b604a3284d0761d3c571c280
src/fake-lock-screen-pattern.h
src/fake-lock-screen-pattern.h
#ifndef _FAKE_LOCK_SCREEN_PATTERN_H_ #define _FAKE_LOCK_SCREEN_PATTERN_H_ #include <gtk/gtk.h> #if !GTK_CHECK_VERSION(3, 0, 0) typedef struct { gdouble red; gdouble green; gdouble blue; gdouble alpha; } GdkRGBA; #endif typedef struct _FakeLockOption { void *module; gchar *real; gchar *dummy; } FakeLockOption; typedef struct { gboolean marked; gint value; GdkPoint top_left; GdkPoint bottom_right; } FakeLockPatternPoint; typedef enum { FLSP_ONE_STROKE, FLSP_ON_BOARD, FLSP_N_PATTERN, } FakeLockScreenPattern; void flsp_draw_circle(cairo_t *context, gint x, gint y, gint radius, GdkRGBA circle, GdkRGBA border); gboolean is_marked(gint x, gint y, gint *marked, void *user_data); #endif
#ifndef _FAKE_LOCK_SCREEN_PATTERN_H_ #define _FAKE_LOCK_SCREEN_PATTERN_H_ #include <gtk/gtk.h> #if !GTK_CHECK_VERSION(3, 0, 0) typedef struct { gdouble red; gdouble green; gdouble blue; gdouble alpha; } GdkRGBA; #endif typedef struct _FakeLockOption { void *module; gchar *real; gchar *dummy; } FakeLockOption; typedef struct { gint mark; gint value; GdkPoint top_left; GdkPoint bottom_right; } FakeLockPatternPoint; typedef enum { FLSP_ONE_STROKE, FLSP_ON_BOARD, FLSP_N_PATTERN, } FakeLockScreenPattern; void flsp_draw_circle(cairo_t *context, gint x, gint y, gint radius, GdkRGBA circle, GdkRGBA border); gboolean is_marked(gint x, gint y, gint *marked, void *user_data); #endif
Use gint to store index
Use gint to store index
C
mit
kenhys/fake-lock-screen-pattern,kenhys/fake-lock-screen-pattern
5b7bc8baba35bc816c7dc94768d9fae05c7b78ec
zephyr/shim/include/zephyr_host_command.h
zephyr/shim/include/zephyr_host_command.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. */ #if !defined(__CROS_EC_HOST_COMMAND_H) || \ defined(__CROS_EC_ZEPHYR_HOST_COMMAND_H) #error "This file must only be included from host_command.h. " \ "Include host_command.h directly" #endif #define __CROS_EC_ZEPHYR_HOST_COMMAND_H #include <init.h> #ifdef CONFIG_PLATFORM_EC_HOSTCMD /** * See include/host_command.h for documentation. */ #define DECLARE_HOST_COMMAND(_command, _routine, _version_mask) \ STRUCT_SECTION_ITERABLE(host_command, _cros_hcmd_##_command) = { \ .command = _command, \ .handler = _routine, \ .version_mask = _version_mask, \ } #else /* !CONFIG_PLATFORM_EC_HOSTCMD */ #ifdef __clang__ #define DECLARE_HOST_COMMAND(command, routine, version_mask) #else #define DECLARE_HOST_COMMAND(command, routine, version_mask) \ enum ec_status (routine)(struct host_cmd_handler_args *args) \ __attribute__((unused)) #endif /* __clang__ */ #endif /* CONFIG_PLATFORM_EC_HOSTCMD */
/* 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. */ #if !defined(__CROS_EC_HOST_COMMAND_H) || \ defined(__CROS_EC_ZEPHYR_HOST_COMMAND_H) #error "This file must only be included from host_command.h. " \ "Include host_command.h directly" #endif #define __CROS_EC_ZEPHYR_HOST_COMMAND_H #include <init.h> #ifdef CONFIG_PLATFORM_EC_HOSTCMD /** * See include/host_command.h for documentation. */ #define DECLARE_HOST_COMMAND(_command, _routine, _version_mask) \ STRUCT_SECTION_ITERABLE(host_command, _cros_hcmd_##_command) = { \ .command = _command, \ .handler = _routine, \ .version_mask = _version_mask, \ } #else /* !CONFIG_PLATFORM_EC_HOSTCMD */ /* * Create a fake routine to call the function. The linker should * garbage-collect it since it is behind 'if (0)' */ #define DECLARE_HOST_COMMAND(command, routine, version_mask) \ int __remove_ ## command(void) \ { \ if (0) \ routine(NULL); \ return 0; \ } #endif /* CONFIG_PLATFORM_EC_HOSTCMD */
Use a different way of handling no host commands
zephyr: Use a different way of handling no host commands When CONFIG_PLATFORM_EC_HOSTCMD is not enabled we want to silently drop the handler routines from the build. The current approach works for gcc but not for clang. Use an exported function instead. BUG=b:208648337 BRANCH=none TEST=CQ and gitlab Signed-off-by: Simon Glass <c00b0378376498bd9cd974c388df8854c0131d27@chromium.org> Change-Id: I63f74e8081556c726472782f60bddbbfbc3e9bf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3313320 Reviewed-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>
C
bsd-3-clause
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
f6a808e5190055af32abe8060bbe7d4ab2d5d6d4
Nocilla/LSNocilla.h
Nocilla/LSNocilla.h
#import <Foundation/Foundation.h> #import "Nocilla.h" #import "LSHTTPRequest.h" @class LSStubRequest; @class LSStubResponse; extern NSString * const LSUnexpectedRequest; @interface LSNocilla : NSObject + (LSNocilla *)sharedInstance; @property (nonatomic, strong, readonly) NSArray *stubbedRequests; - (void)start; - (void)stop; - (void)addStubbedRequest:(LSStubRequest *)request; - (void)clearStubs; - (LSStubResponse *)responseForRequest:(id<LSHTTPRequest>)request; @end
#import <Foundation/Foundation.h> #import "Nocilla.h" @class LSStubRequest; @class LSStubResponse; @protocol LSHTTPRequest; extern NSString * const LSUnexpectedRequest; @interface LSNocilla : NSObject + (LSNocilla *)sharedInstance; @property (nonatomic, strong, readonly) NSArray *stubbedRequests; - (void)start; - (void)stop; - (void)addStubbedRequest:(LSStubRequest *)request; - (void)clearStubs; - (LSStubResponse *)responseForRequest:(id<LSHTTPRequest>)request; @end
Replace import with forward declaration.
Replace import with forward declaration.
C
mit
pcantrell/Nocilla,ileitch/Nocilla,luisobo/Nocilla,0xmax/Nocilla,patcheng/Nocilla,tomguthrie/Nocilla,Panajev/Nocilla,luxe-eng/valet-ios.Nocilla,SanjoDeundiak/Nocilla,TheAdamBorek/Nocilla,luxe-eng/valet-ios.Nocilla,0xmax/Nocilla,TheAdamBorek/Nocilla
ad24240e3d614bf8c10199590571a48ac3debc6e
test/profile/instrprof-basic.c
test/profile/instrprof-basic.c
// RUN: %clang_profgen -o %t -O3 -flto %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %t // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s int main(int argc, const char *argv[]) { // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1 if (argc) return 0; return 1; } // CHECK: !1 = metadata !{metadata !"branch_weights", i32 2, i32 1}
// RUN: %clang_profgen -o %t -O3 %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %t // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s int main(int argc, const char *argv[]) { // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1 if (argc) return 0; return 1; } // CHECK: !1 = metadata !{metadata !"branch_weights", i32 2, i32 1}
Remove LTO dependency from test
InstrProf: Remove LTO dependency from test The -flto flag relies on linker features that are not available on all platforms. <rdar://problem/16458307> git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@205318 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
ee12c53b52716c08c50bf0c64b644c9af5be10de
SAMCategories/SAMCategories.h
SAMCategories/SAMCategories.h
// // SAMCategories.h // SAMCategories // // Created by Sam Soffes on 7/17/13. // Copyright 2013 Sam Soffes. All rights reserved. // // Foundation #import "NSArray+SAMAdditions.h" #import "NSData+SAMAdditions.h" #import "NSDate+SAMAdditions.h" #import "NSDictionary+SAMAdditions.h" #import "NSNumber+SAMAdditions.h" #import "NSObject+SAMAdditions.h" #import "NSString+SAMAdditions.h" #import "NSURL+SAMAdditions.h" // UIKit #if TARGET_OS_IPHONE #import "UIApplication+SAMAdditions.h" #import "UIColor+SAMAdditions.h" #import "UIDevice+SAMAdditions.h" #import "UIScreen+SAMAdditions.h" #import "UIScrollView+SAMAdditions.h" #import "UIView+SAMAdditions.h" #import "UIViewController+SAMAdditions.h" #endif
// // SAMCategories.h // SAMCategories // // Created by Sam Soffes on 7/17/13. // Copyright 2013 Sam Soffes. All rights reserved. // // Foundation #import "NSArray+SAMAdditions.h" #import "NSData+SAMAdditions.h" #import "NSDate+SAMAdditions.h" #import "NSDictionary+SAMAdditions.h" #import "NSNumber+SAMAdditions.h" #import "NSObject+SAMAdditions.h" #import "NSString+SAMAdditions.h" #import "NSURL+SAMAdditions.h" // UIKit #if TARGET_OS_IPHONE #import "UIApplication+SAMAdditions.h" #import "UIColor+SAMAdditions.h" #import "UIControl+SAMAdditions.h" #import "UIDevice+SAMAdditions.h" #import "UIScreen+SAMAdditions.h" #import "UIScrollView+SAMAdditions.h" #import "UIView+SAMAdditions.h" #import "UIViewController+SAMAdditions.h" #endif
Add missing import for UIControl+SAMAdditions.h
Add missing import for UIControl+SAMAdditions.h
C
mit
soffes/SAMCategories,cloudjanak/SAMCategories
91dbe918a3ed65fa8a057d7ced6ffc2016857d50
SwiftDevHints/SwiftDevHints.h
SwiftDevHints/SwiftDevHints.h
// // SwiftDevHints.h // SwiftDevHints // // Created by ZHOU DENGFENG on 15/7/17. // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // #import <UIKit/UIKit.h> #import <CommonCrypto/CommonCrypto.h> //! Project version number for SwiftDevHints. FOUNDATION_EXPORT double SwiftDevHintsVersionNumber; //! Project version string for SwiftDevHints. FOUNDATION_EXPORT const unsigned char SwiftDevHintsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SwiftDevHints/PublicHeader.h>
// // SwiftDevHints.h // SwiftDevHints // // Created by ZHOU DENGFENG on 15/7/17. // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // @import Foundation; #import <CommonCrypto/CommonCrypto.h> //! Project version number for SwiftDevHints. FOUNDATION_EXPORT double SwiftDevHintsVersionNumber; //! Project version string for SwiftDevHints. FOUNDATION_EXPORT const unsigned char SwiftDevHintsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <SwiftDevHints/PublicHeader.h>
Remove UIKit import to support macOS
Remove UIKit import to support macOS
C
mit
derekcoder/SwiftDevHints,derekcoder/SwiftDevHints