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
|
|---|---|---|---|---|---|---|---|---|---|
d3c92bbf60ad44338dc87655191e8baa5fc4d96a
|
src/vio/csync_vio_handle.h
|
src/vio/csync_vio_handle.h
|
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008 by Andreas Schneider <mail@cynapses.org>
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* vim: ft=c.doxygen ts=2 sw=2 et cindent
*/
#ifndef _CSYNC_VIO_HANDLE_H
#define _CSYNC_VIO_HANDLE_H
typedef void *csync_vio_method_handle_t;
typedef struct csync_vio_handle_s csync_vio_handle_t;
#endif /* _CSYNC_VIO_HANDLE_H */
|
/*
* libcsync -- a library to sync a directory with another
*
* Copyright (c) 2008 by Andreas Schneider <mail@cynapses.org>
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* vim: ft=c.doxygen ts=2 sw=2 et cindent
*/
#ifndef _CSYNC_VIO_HANDLE_H
#define _CSYNC_VIO_HANDLE_H
typedef void csync_vio_method_handle_t;
typedef struct csync_vio_handle_s csync_vio_handle_t;
#endif /* _CSYNC_VIO_HANDLE_H */
|
Use the right type for the csync_vio_method_handle_t.
|
Use the right type for the csync_vio_method_handle_t.
|
C
|
lgpl-2.1
|
gco/csync,gco/csync,gco/csync,meeh420/csync,meeh420/csync,meeh420/csync,gco/csync
|
20a03ffdbb3469cf9d24afd1007ca1f16196a195
|
libc/stdlib/bsearch.c
|
libc/stdlib/bsearch.c
|
/*
* This file lifted in toto from 'Dlibs' on the atari ST (RdeBath)
*
*
* Dale Schumacher 399 Beacon Ave.
* (alias: Dalnefre') St. Paul, MN 55104
* dal@syntel.UUCP United States of America
* "It's not reality that's important, but how you perceive things."
*/
#include <stdio.h>
static int _bsearch; /* index of element found, or where to
* insert */
char *bsearch(key, base, num, size, cmp)
register char *key; /* item to search for */
register char *base; /* base address */
int num; /* number of elements */
register int size; /* element size in bytes */
register int (*cmp) (); /* comparison function */
{
register int a, b, c, dir;
a = 0;
b = num - 1;
while (a <= b) {
c = (a + b) >> 1; /* == ((a + b) / 2) */
if ((dir = (*cmp) (key, (base + (c * size))))) {
if (dir < 0)
b = c - 1;
else /* (dir > 0) */
a = c + 1;
} else {
_bsearch = c;
return (base + (c * size));
}
}
_bsearch = b;
return (NULL);
}
|
/*
* This file originally lifted in toto from 'Dlibs' on the atari ST (RdeBath)
*
*
* Dale Schumacher 399 Beacon Ave.
* (alias: Dalnefre') St. Paul, MN 55104
* dal@syntel.UUCP United States of America
* "It's not reality that's important, but how you perceive things."
*
* Reworked by Erik Andersen <andersen@uclibc.org>
*/
#include <stdio.h>
void * bsearch (const void *key, const void *base, size_t num, size_t size,
int (*cmp) (const void *, const void *))
{
int dir;
size_t a, b, c;
const void *p;
a = 0;
b = num;
while (a < b)
{
c = (a + b) >> 1; /* == ((a + b) / 2) */
p = (void *)(((const char *) base) + (c * size));
dir = (*cmp)(key, p);
if (dir < 0) {
b = c;
} else if (dir > 0) {
a = c + 1;
} else {
return (void *)p;
}
}
return NULL;
}
|
Rework and kill pointless static variable -Erik
|
Rework and kill pointless static variable
-Erik
|
C
|
lgpl-2.1
|
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
|
32cd7b3a779cf2ec3341c56802df50c72607f5a1
|
lin-client/src/main.c
|
lin-client/src/main.c
|
static char startmessage[] = "Linux Backup Client";
#include<stdio.h>
#include<string.h>
#include"db.h"
int main(int argc, char **argv)
{
int argindex = 0;
puts(startmessage);
for(argindex = 1; argindex < argc; argindex++)
{
if(strcmp(argv[argindex], "version") == 0)
{
puts("This should display version");
}
else if(strcmp(argv[argindex], "new") == 0)
{
puts("This should create a new block");
printf("Creating new block with name '%s'\n", argv[argindex + 1]);
++argindex;
write_database(argv[argindex + 1]);
}
else if(strcmp(argv[argindex], "create") == 0)
{
if(create_database(argv[argindex + 1]))
{
puts("Cannot open file.");
}
++argindex;
}
else
{
printf("Command '%s' not regognized\n", argv[argindex]);
}
}
return 0;
}
|
static char startmessage[] = "Linux Backup Client";
#include<stdio.h>
#include<string.h>
#include"db.h"
int main(int argc, char **argv)
{
THIS WILL BREAK THE BUILD!
int argindex = 0;
puts(startmessage);
for(argindex = 1; argindex < argc; argindex++)
{
if(strcmp(argv[argindex], "version") == 0)
{
puts("This should display version");
}
else if(strcmp(argv[argindex], "new") == 0)
{
puts("This should create a new block");
printf("Creating new block with name '%s'\n", argv[argindex + 1]);
++argindex;
write_database(argv[argindex + 1]);
}
else if(strcmp(argv[argindex], "create") == 0)
{
if(create_database(argv[argindex + 1]))
{
puts("Cannot open file.");
}
++argindex;
}
else
{
printf("Command '%s' not regognized\n", argv[argindex]);
}
}
return 0;
}
|
Test to see what jenkins will do
|
Test to see what jenkins will do
|
C
|
mit
|
paulkramme/backup
|
2ff0d3cfdd0920c179616e8d0738c376f787d22a
|
scripts/testScreens/setup/stuffCheckBox.c
|
scripts/testScreens/setup/stuffCheckBox.c
|
testScreens: setup: stuffCheckBox
Go to Field [ ]
If [ tempSetup::InventoryLibaryYN = "" ]
Set Field [ tempSetup::layoutLtagK; "" ]
Set Field [ tempSetup::layoutRtagK; "" ]
Set Field [ tempSetup::layoutLtagN; "" ]
Set Field [ tempSetup::layoutRtagN; "" ]
Else
Set Field [ tempSetup::layoutLtagK; "moreltagNKs2" ]
Set Field [ tempSetup::layoutRtagK; "moreReferenceMenu2SkeywordOrNode1" ]
Set Field [ tempSetup::layoutLtagN; "moreltagNKs2" ]
Set Field [ tempSetup::layoutRtagN; "moreReferenceMenu2SkeywordOrNode1" ]
End If
May 4, 平成27 21:28:07 Library.fp7 - stuffCheckBox -1-
|
changeLibraryOrLibraryName: stuffCheckBox
#
#Exit the checkbox.
Go to Field [ ]
#
#Set default layouts for a reference library.
If [ tempSetup::InventoryLibaryYN = "" ]
Set Field [ tempSetup::layoutLtagK; "" ]
Set Field [ tempSetup::layoutRtagK; "" ]
Set Field [ tempSetup::layoutLtagN; "" ]
Set Field [ tempSetup::layoutRtagN; "" ]
#
#Designate library as a reference library.
Set Field [ sectionAttributionInfo::order; "" ]
Else
#
#Set default layouts for a stuff/inventory library.
Set Field [ tempSetup::layoutLtagK; "moreltagNKs2" ]
Set Field [ tempSetup::layoutRtagK; "moreReferenceMenu2SkeywordOrNode1" ]
Set Field [ tempSetup::layoutLtagN; "moreltagNKs2" ]
Set Field [ tempSetup::layoutRtagN; "moreReferenceMenu2SkeywordOrNode1" ]
#
#Designate library as a stuff/inventory library.
Set Field [ sectionAttributionInfo::order; 1 ]
End If
December 27, ଘ౮27 19:05:50 Library.fp7 - stuffCheckBox -1-
|
Make library type checkbox part of the library record.
|
Make library type checkbox part of the library record.
|
C
|
apache-2.0
|
HelpGiveThanks/Library,HelpGiveThanks/Library
|
7461cac37cacffb49f7084332a9e39eeafb39f6f
|
COFF/Error.h
|
COFF/Error.h
|
//===- Error.h --------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLD_COFF_ERROR_H
#define LLD_COFF_ERROR_H
#include "lld/Core/LLVM.h"
#include "llvm/Support/Error.h"
namespace lld {
namespace coff {
LLVM_ATTRIBUTE_NORETURN void error(const Twine &Msg);
void error(std::error_code EC, const Twine &Prefix);
void error(llvm::Error E, const Twine &Prefix);
template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) {
error(V.getError(), Prefix);
}
template <class T> T check(Expected<T> E, const Twine &Prefix) {
if (!E)
return std::move(*E);
error(E.takeError(), Prefix);
return T();
}
} // namespace coff
} // namespace lld
#endif
|
//===- Error.h --------------------------------------------------*- C++ -*-===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLD_COFF_ERROR_H
#define LLD_COFF_ERROR_H
#include "lld/Core/LLVM.h"
#include "llvm/Support/Error.h"
namespace lld {
namespace coff {
LLVM_ATTRIBUTE_NORETURN void error(const Twine &Msg);
void error(std::error_code EC, const Twine &Prefix);
void error(llvm::Error E, const Twine &Prefix);
template <typename T> void error(const ErrorOr<T> &V, const Twine &Prefix) {
error(V.getError(), Prefix);
}
template <class T> T check(Expected<T> E, const Twine &Prefix) {
if (E)
return std::move(*E);
error(E.takeError(), Prefix);
return T();
}
} // namespace coff
} // namespace lld
#endif
|
Fix logic error in check() function.
|
Fix logic error in check() function.
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@274195 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/lld,llvm-mirror/lld
|
51450367c482ab3e47ee0a09e7196d772b81d7ed
|
src/moints/moints_cutil.c
|
src/moints/moints_cutil.c
|
#if defined(CRAY_T3E) || defined(CRAY_T3D)
int ONBITMASK( int *len )
#else
int onbitmask_( int *len )
#endif
{
unsigned int mask;
mask = ~((~0) << *len);
return ((int)mask);
}
|
#include <stdio.h>
void c_print_sparsemat( int, int, int *, int *, int, double * );
#if defined(CRAY_T3E) || defined(CRAY_T3D)
int ONBITMASK( int *len )
#else
int onbitmask_( int *len )
#endif
{
unsigned int mask;
mask = ~((~0) << *len);
return ((int)mask);
}
#ifdef NOCOMPILE
void print_sparsemat_( int *nc, int *nr, int *cpi, int *ir, int *nnz, double *v )
{
c_print_sparsemat( *nc, *nr, cpi, ir, *nnz, v );
}
void c_print_sparsemat( int nc, int nr, int *cpi, int *ir, int nnz, double *v )
{
int ic, colmax, cvlo, cvhi, ncv;
int npr, hasprint, ii2r, iiv, iir, mask16bit;
int ilab;
colmax = nc < 6 ? nc : 6;
mask16bit = ~((~0) << 16);
/*
printf("\n");
for (ic=0; ic<colmax; ++ic) {
printf(" %3d %3d ", cpi[2*ic], cpi[2*ic+1] );
}
printf("\n");
*/
ii2r = sizeof(int)/2; /* num of labels packed per int - 16 bits per label */
npr = 1;
hasprint = 1;
while (hasprint) {
hasprint = 0;
for (ic=0; ic<colmax; ++ic) {
cvlo = cpi[2*ic];
cvhi = cpi[2*ic+1];
ncv = cvhi - cvlo + 1;
if ((cvlo>0)&&(ncv>=npr)) {
iiv = cvlo + npr - 1;
iir = iiv/ii2r + ((iiv%ii2r) ? 1 : 0);
ilab = (ir[iir-1] >> (16*(iiv%ii2r))) & mask16bit;
printf(" %2d %8.4f", ilab, v[iiv-1] );
++hasprint;
}
else {
printf(" ");
}
}
printf("\n");
++npr;
}
}
#endif
|
Add routines to print sparse data structures
|
ATW: Add routines to print sparse data structures
|
C
|
mit
|
rangsimanketkaew/NWChem
|
23fdae0727101cefbb02f756edd49729b707a0b9
|
Practice/2d_array.c
|
Practice/2d_array.c
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main(){
int arr[6][6];
int max = 0;
int sum = 0;
int n = 0;
for(int arr_i = 0; arr_i < 6; arr_i++){
for(int arr_j = 0; arr_j < 6; arr_j++){
scanf("%d",&arr[arr_i][arr_j]);
}
}
for(int arr_i = 2, mid = arr_i + 1; arr_i < 5; arr_i++){
for(int arr_j = 0; arr_j < 3; arr_j++){
if(arr_i == mid)
{
sum += arr[mid][arr_j + 1];
break;
}
else
{
sum += arr[arr_i][arr_j];
max = (sum > max) ? sum : max;
}
}
}
printf("%i\n", max);
return max;
}
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int hourglass(int *array);
int main(){
int arr[6][6];
int max = 0;
int sum = 0;
int n = 0;
int i = 0;
int j = 0;
for(int row = 0; row < 6; row++){
for(int column = 0; column < 6; column++){
scanf("%d", &arr[row][column]);
}
}
while(n < 16)
{
for(int row = i; row < i + 3; row++){
for(int column = j; column < j + 3; column++){
if(row == i + 1)
{
sum += arr[i + 1][j + 1];
break;
}
sum += arr[row][column];
}
}
if(j + 3 < 6)
{
j++;
}
else
{
j = 0;
i++;
}
if(sum > max || n == 0)
{
max = sum;
sum = 0;
}
else
{
sum = 0;
}
n++;
}
printf("%i\n", max);
return max;
}
|
Add 2D Array - DS Challenge
|
Add 2D Array - DS Challenge
|
C
|
mit
|
Kunal57/C_Problems,Kunal57/C_Problems
|
fc855344ec4e97aa8de49c52c15fdb854fc2c310
|
Ansi.c
|
Ansi.c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* ʾǺ궨ʱõһּ
* 1) ĺһǸ
* 2) ΪͨԺǿ׳ҪܶԺʹ÷κμ
*/
#define PRINT_GREETINGS do { \
printf("Hi there!\n"); \
} while (0)
int main(const int argc, const char* const* argv)
{
// Invoke function via macro
PRINT_GREETINGS;
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* ʾǺ궨ʱõһּ
* 1) ĺһǸ
* 2) ΪͨԺǿ׳ҪܶԺʹ÷κμ
*/
#define PRINT_GREETINGS do { \
printf("Hi there!\n"); \
} while (0)
int main(const int argc, const char* const* argv)
{
// Invoke function via macro
PRINT_GREETINGS;
return EXIT_SUCCESS;
}
|
Return errorlevel with macro EXIT_SUCCESS.
|
Return errorlevel with macro EXIT_SUCCESS.
|
C
|
mit
|
niucheng/Snippets,niucheng/Snippets,niucheng/Snippets
|
d940b57163ff5ab118821be7ad3e9ede057f5a75
|
Mac/Python/macsetfiletype.c
|
Mac/Python/macsetfiletype.c
|
/*
* macsetfiletype - Set the mac's idea of file type
*
*/
#include <Files.h>
#include <pascal.h>
int
setfiletype(name, creator, type)
char *name;
long creator, type;
{
FInfo info;
unsigned char *pname;
pname = c2pstr(name);
if ( GetFInfo(pname, 0, &info) < 0 )
return -1;
info.fdType = type;
info.fdCreator = creator;
return SetFInfo(pname, 0, &info);
}
|
/*
* macsetfiletype - Set the mac's idea of file type
*
*/
#include "macdefs.h"
int
setfiletype(name, creator, type)
char *name;
long creator, type;
{
FInfo info;
unsigned char *pname;
pname = (StringPtr) c2pstr(name);
if ( GetFInfo(pname, 0, &info) < 0 )
return -1;
info.fdType = type;
info.fdCreator = creator;
return SetFInfo(pname, 0, &info);
}
|
Make it work under MPW too.
|
Make it work under MPW too.
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
ebf2d2689de551d90965090bb991fc640a0c0d41
|
arch/x86/lib/usercopy.c
|
arch/x86/lib/usercopy.c
|
/*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
#include <linux/sched.h>
/*
* We rely on the nested NMI work to allow atomic faults from the NMI path; the
* nested NMI paths are careful to preserve CR2.
*/
unsigned long
copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long ret;
if (__range_not_ok(from, n, TASK_SIZE))
return 0;
/*
* Even though this function is typically called from NMI/IRQ context
* disable pagefaults so that its behaviour is consistent even when
* called form other contexts.
*/
pagefault_disable();
ret = __copy_from_user_inatomic(to, from, n);
pagefault_enable();
return ret;
}
EXPORT_SYMBOL_GPL(copy_from_user_nmi);
|
/*
* User address space access functions.
*
* For licencing details see kernel-base/COPYING
*/
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/word-at-a-time.h>
#include <linux/sched.h>
/*
* We rely on the nested NMI work to allow atomic faults from the NMI path; the
* nested NMI paths are careful to preserve CR2.
*/
unsigned long
copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
{
unsigned long ret;
if (__range_not_ok(from, n, TASK_SIZE))
return n;
/*
* Even though this function is typically called from NMI/IRQ context
* disable pagefaults so that its behaviour is consistent even when
* called form other contexts.
*/
pagefault_disable();
ret = __copy_from_user_inatomic(to, from, n);
pagefault_enable();
return ret;
}
EXPORT_SYMBOL_GPL(copy_from_user_nmi);
|
Fix copy_from_user_nmi() return if range is not ok
|
perf/x86: Fix copy_from_user_nmi() return if range is not ok
Commit 0a196848ca36 ("perf: Fix arch_perf_out_copy_user default"),
changes copy_from_user_nmi() to return the number of
remaining bytes so that it behave like copy_from_user().
Unfortunately, when the range is outside of the process
memory, the return value is still the number of byte
copied, eg. 0, instead of the remaining bytes.
As all users of copy_from_user_nmi() were modified as
part of commit 0a196848ca36, the function should be
fixed to return the total number of bytes if range is
not correct.
Signed-off-by: Yann Droneaud <32f7bf5a1f07a8b363256f1773dbeada59d65244@opteya.com>
Signed-off-by: Peter Zijlstra (Intel) <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Link: http://lkml.kernel.org/r/1435001923-30986-1-git-send-email-32f7bf5a1f07a8b363256f1773dbeada59d65244@opteya.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
0ded12b69f0834a48f2310cc7f1a5f1852b2b41f
|
asylo/platform/posix/include/byteswap.h
|
asylo/platform/posix/include/byteswap.h
|
/*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); }
inline uint32_t bswap_32(uint32_t n) { return __builtin_bswap32(n); }
inline uint64_t bswap_64(uint64_t n) { return __builtin_bswap64(n); }
#ifdef __cplusplus
}
#endif
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
|
/*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#define ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
static inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); }
static inline uint32_t bswap_32(uint32_t n) { return __builtin_bswap32(n); }
static inline uint64_t bswap_64(uint64_t n) { return __builtin_bswap64(n); }
#ifdef __cplusplus
}
#endif
#endif // ASYLO_PLATFORM_POSIX_INCLUDE_BYTESWAP_H_
|
Declare bswap functions as static inline
|
Declare bswap functions as static inline
Change declaration to static inline to avoid multiple definition
during linking.
PiperOrigin-RevId: 207000800
|
C
|
apache-2.0
|
google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo
|
125eec8781231cf21041b742dccd906ef1c55738
|
include/integrator/path_integrator.h
|
include/integrator/path_integrator.h
|
#ifndef PATH_INTEGRATOR_H
#define PATH_INTEGRATOR_H
#include "surface_integrator.h"
#include "renderer/renderer.h"
/*
* Surface integrator that uses Path tracing for computing illumination at a point on the surface
*/
class PathIntegrator : public SurfaceIntegrator {
const int min_depth, max_depth;
public:
/*
* Create the path tracing integrator and set the min and max depth for paths
* rays are randomly stopped by Russian roulette after reaching min_depth and are stopped
* at max_depth
*/
PathIntegrator(int min_depth, int max_depth);
/*
* Compute the illumination at a point on a surface in the scene
*/
Colorf illumination(const Scene &scene, const Renderer &renderer, const RayDifferential &ray,
DifferentialGeometry &dg, Sampler &sampler, MemoryPool &pool) const override;
private:
/*
* Trace a camera path starting from the first hit at dg returning the throughput of the
* path and the BSDF of the last object hit and the direction we hit it from so that we
* can connect the path to a light path
*/
Colorf trace_camera(const Scene &scene, const Renderer &renderer, const RayDifferential &ray,
DifferentialGeometry &dg, Sampler &sampler, MemoryPool &pool, BSDF *&bsdf, Vector &w_o) const;
/*
* Trace a light path returning the illumination along the path and the BSDF of
* of the last object hit and the direction we hit it from so that we
*/
Colorf trace_light(const Scene &scene, const Renderer &renderer, Sampler &sampler,
MemoryPool &pool, BSDF *&bsdf, Vector &w_o) const;
};
#endif
|
#ifndef PATH_INTEGRATOR_H
#define PATH_INTEGRATOR_H
#include "surface_integrator.h"
#include "renderer/renderer.h"
/*
* Surface integrator that uses Path tracing for computing illumination at a point on the surface
*/
class PathIntegrator : public SurfaceIntegrator {
const int min_depth, max_depth;
public:
/*
* Create the path tracing integrator and set the min and max depth for paths
* rays are randomly stopped by Russian roulette after reaching min_depth and are stopped
* at max_depth
*/
PathIntegrator(int min_depth, int max_depth);
/*
* Compute the illumination at a point on a surface in the scene
*/
Colorf illumination(const Scene &scene, const Renderer &renderer, const RayDifferential &ray,
DifferentialGeometry &dg, Sampler &sampler, MemoryPool &pool) const override;
};
#endif
|
Remove the unused bidir functions from path tracer
|
Remove the unused bidir functions from path tracer
|
C
|
mit
|
Twinklebear/tray,Twinklebear/tray
|
289440851590e50387cf1a121abad63c704b84ab
|
src/exercise102.c
|
src/exercise102.c
|
/*
* A solution to Exercise 1-2 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 <stdio.h>
#include <stdlib.h>
int main(void)
{
puts("\\a produces an audible or visual alert: \a");
puts("\\f produces a formfeed: \f");
puts("\\r produces a carriage return: \rlololol");
puts("\\v produces a vertical tab: \t");
return EXIT_SUCCESS;
}
|
/*
* A solution to Exercise 1-2 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 <stdio.h>
#include <stdlib.h>
int main(void)
{
puts("An audible or visual alert: \a");
puts("A form feed: \f");
puts("A carriage return: \r");
puts("A vertical tab: \v");
return EXIT_SUCCESS;
}
|
Fix solution to Exercise 1-2.
|
Fix solution to Exercise 1-2.
|
C
|
unlicense
|
damiendart/knr-solutions,damiendart/knr-solutions,damiendart/knr-solutions
|
b0183a9c878d330245437728c658360eb84e895d
|
src/shared/log.h
|
src/shared/log.h
|
/*
* This file is part of buxton.
*
* Copyright (C) 2013 Intel Corporation
*
* buxton 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.
*/
#pragma once
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef DEBUG
#define buxton_debug() buxton_log()
#else
#define buxton_debug do {} while(0);
#endif /* DEBUG */
void buxton_log(const char* fmt, ...);
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
* :indentSize=8:tabSize=8:noTabs=false:
*/
|
/*
* This file is part of buxton.
*
* Copyright (C) 2013 Intel Corporation
*
* buxton 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.
*/
#pragma once
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef DEBUG
#define buxton_debug(...) buxton_log(__VA_ARGS__)
#else
#define buxton_debug(...) do {} while(0);
#endif /* DEBUG */
void buxton_log(const char* fmt, ...);
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
* :indentSize=8:tabSize=8:noTabs=false:
*/
|
Fix the buxton_debug macro to support arguments
|
Fix the buxton_debug macro to support arguments
|
C
|
lgpl-2.1
|
sofar/buxton,sofar/buxton
|
754205371f3d3bb2c1b6332fba4b7eee575fd1db
|
src/system_res.h
|
src/system_res.h
|
/*
* system_res.h
*
* Author: Ben Lai, Ming Tsang, Peggy Lau
* Copyright (c) 2014-2015 HKUST SmartCar Team
* Refer to LICENSE for details
*/
namespace camera
{
struct SystemRes
{
};
}
|
/*
* system_res.h
*
* Author: Ben Lai, Ming Tsang, Peggy Lau
* Copyright (c) 2014-2015 HKUST SmartCar Team
* Refer to LICENSE for details
*/
namespace camera
{
class Car;
}
namespace camera
{
struct SystemRes
{
Car *car;
};
}
|
Add car to system res
|
Add car to system res
|
C
|
mit
|
travistang/Camera15-T1,travistang/Camera15-T1,hkust-smartcar/Camera15-T1,hkust-smartcar/Camera15-T1
|
98069b8a5962874e664f11dc5eb9f0ba76591eb7
|
src/event_detection.h
|
src/event_detection.h
|
#ifndef EVENT_DETECTION_H
# define EVENT_DETECTION_H
# include "scrappie_structures.h"
typedef struct {
size_t window_length1;
size_t window_length2;
float threshold1;
float threshold2;
float peak_height;
} detector_param;
static detector_param const event_detection_defaults = {
.window_length1 = 3,
.window_length2 = 6,
.threshold1 = 1.4f,
.threshold2 = 1.1f,
.peak_height = 0.2f
};
event_table detect_events(raw_table const rt, detector_param const edparam);
#endif /* EVENT_DETECTION_H */
|
#ifndef EVENT_DETECTION_H
# define EVENT_DETECTION_H
# include "scrappie_structures.h"
typedef struct {
size_t window_length1;
size_t window_length2;
float threshold1;
float threshold2;
float peak_height;
} detector_param;
static detector_param const event_detection_defaults = {
.window_length1 = 3,
.window_length2 = 6,
.threshold1 = 1.4f,
.threshold2 = 9.0f,
.peak_height = 0.2f
};
event_table detect_events(raw_table const rt, detector_param const edparam);
#endif /* EVENT_DETECTION_H */
|
Update threshold for second window
|
Update threshold for second window
|
C
|
mpl-2.0
|
nanoporetech/scrappie,nanoporetech/scrappie,nanoporetech/scrappie
|
1c54410af3ed87100eca258bc58533ad434e618e
|
testing/unittest/special_types.h
|
testing/unittest/special_types.h
|
#pragma once
template <typename T, unsigned int N>
struct FixedVector
{
T data[N];
__host__ __device__
FixedVector() { }
__host__ __device__
FixedVector(T init)
{
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
__host__ __device__
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
}
__host__ __device__
bool operator<(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
return true;
else if(bs.data[i] < data[i])
return false;
}
return false;
}
__host__ __device__
bool operator==(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))
return false;
}
return true;
}
};
|
#pragma once
template <typename T, unsigned int N>
struct FixedVector
{
T data[N];
__host__ __device__
FixedVector() : data() { }
__host__ __device__
FixedVector(T init)
{
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
__host__ __device__
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
}
__host__ __device__
bool operator<(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
return true;
else if(bs.data[i] < data[i])
return false;
}
return false;
}
__host__ __device__
bool operator==(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))
return false;
}
return true;
}
};
|
Initialize FixedVector's member in its null constructor to eliminate a Wall warning.
|
Initialize FixedVector's member in its null constructor to eliminate a Wall warning.
|
C
|
apache-2.0
|
google-code-export/thrust,allendaicool/thrust,hemmingway/thrust,hemmingway/thrust,levendlee/thrust,hemmingway/thrust,julianromera/thrust,levendlee/thrust,malenie/thrust,bfurtaw/thrust,rdmenezes/thrust,UIKit0/thrust,h1arshad/thrust,UIKit0/thrust,malenie/thrust,hemmingway/thrust,rdmenezes/thrust,levendlee/thrust,lishi0927/thrust,Vishwa07/thrust,rdmenezes/thrust,allendaicool/thrust,julianromera/thrust,allendaicool/thrust,julianromera/thrust,Vishwa07/thrust,Vishwa07/thrust,google-code-export/thrust,Vishwa07/thrust,allendaicool/thrust,lishi0927/thrust,UIKit0/thrust,julianromera/thrust,lishi0927/thrust,malenie/thrust,UIKit0/thrust,levendlee/thrust,h1arshad/thrust,lishi0927/thrust,bfurtaw/thrust,bfurtaw/thrust,bfurtaw/thrust,h1arshad/thrust,google-code-export/thrust,h1arshad/thrust,google-code-export/thrust,rdmenezes/thrust,malenie/thrust
|
cd73593a424a38f7e79b749086d6e3543ba88356
|
io/file_descriptor.h
|
io/file_descriptor.h
|
#ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
virtual Action *close(EventCallback *);
virtual Action *read(size_t, EventCallback *);
virtual Action *write(Buffer *, EventCallback *);
virtual bool shutdown(bool, bool)
{
return (false);
}
};
#endif /* !FILE_DESCRIPTOR_H */
|
#ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
virtual Action *close(EventCallback *);
virtual Action *read(size_t, EventCallback *);
virtual Action *write(Buffer *, EventCallback *);
virtual bool shutdown(bool, bool)
{
return (true);
}
};
#endif /* !FILE_DESCRIPTOR_H */
|
Return success rather than failure from shutdown() on FileDescriptor, since it is entirely immaterial.
|
Return success rather than failure from shutdown() on FileDescriptor, since it
is entirely immaterial.
|
C
|
bsd-2-clause
|
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
|
8dd70959300cd08be029518be56bc64ccfe271df
|
test/Analysis/dump_egraph.c
|
test/Analysis/dump_egraph.c
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
// RUN: -analyzer-dump-egraph=%t.dot %s
// RUN: cat %t.dot | FileCheck %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
// RUN: -analyzer-dump-egraph=%t.dot \
// RUN: -trim-egraph %s
// RUN: cat %t.dot | FileCheck %s
// REQUIRES: asserts
int getJ();
int foo() {
int *x = 0, *y = 0;
char c = '\x13';
return *x + *y;
}
// CHECK: \"program_points\": [\l \{ \"kind\": \"Edge\", \"src_id\": 2, \"dst_id\": 1, \"terminator\": null, \"term_kind\": null, \"tag\": null, \"node_id\": 1, \"is_sink\":0, \"has_report\": 0 \}\l ],\l \"program_state\": null
// CHECK: \"program_points\": [\l \{ \"kind\": \"BlockEntrance\", \"block_id\": 1
// CHECK: \"pretty\": \"*x\", \"location\": \{ \"line\": 18, \"column\": 10, \"file\": \"{{(.+)}}dump_egraph.c\" \}
// CHECK: \"pretty\": \"'\\\\x13'\"
// CHECK: \"has_report\": 1
|
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
// RUN: -analyzer-dump-egraph=%t.dot %s
// RUN: cat %t.dot | FileCheck %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
// RUN: -analyzer-dump-egraph=%t.dot \
// RUN: -trim-egraph %s
// RUN: cat %t.dot | FileCheck %s
// REQUIRES: asserts
int getJ();
int foo() {
int *x = 0, *y = 0;
char c = '\x13';
return *x + *y;
}
// CHECK: \"program_points\": [\l \{ \"kind\": \"Edge\", \"src_id\": 2, \"dst_id\": 1, \"terminator\": null, \"term_kind\": null, \"tag\": null, \"node_id\": 1, \"is_sink\": 0, \"has_report\": 0 \}\l ],\l \"program_state\": null
// CHECK: \"program_points\": [\l \{ \"kind\": \"BlockEntrance\", \"block_id\": 1
// CHECK: \"pretty\": \"*x\", \"location\": \{ \"line\": 18, \"column\": 10, \"file\": \"{{(.+)}}dump_egraph.c\" \}
// CHECK: \"pretty\": \"'\\\\x13'\"
// CHECK: \"has_report\": 1
|
Fix typo in r375186. Unbreaks tests.
|
[analyzer] exploded-graph-rewriter: Fix typo in r375186. Unbreaks tests.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@375189 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
8f7bbd87a709803e90aacd4e5fd9810b110b799d
|
test/src/testfw.h
|
test/src/testfw.h
|
#ifndef LOG_TESTFW_H
#define LOG_TESTFW_H
#include <stdio.h>
#define NEUTRAL "\x1B[0m"
#define GREEN "\x1B[32m"
#define RED "\x1B[31m"
void testfw_add(void (*)(int*), const char*);
int testfw_run();
#define TEST(name) void name(int*); void __attribute__((constructor)) pre_##name() {testfw_add(name, #name);} void name(int* __errors __attribute__((unused)))
#define FAILED(name) fprintf(stderr, "[ %sFAILED%s ] %s (%s:%d)\n", RED, NEUTRAL, name, __FILE__, __LINE__)
#define PASSED(name) printf("[ %sPASSED%s ] %s\n", GREEN, NEUTRAL, name);
#define ASSERT(stmt) if (!(stmt)) {++(*__errors); FAILED(__FUNCTION__);}
#endif
|
#ifndef LOG_TESTFW_H
#define LOG_TESTFW_H
#include <stdio.h>
#define NEUTRAL "\x1B[0m"
#define GREEN "\x1B[32m"
#define RED "\x1B[31m"
void testfw_add(void (*)(int*), const char*);
int testfw_run();
#define TEST(name) void name(int*); void __attribute__((constructor)) pre_##name() {testfw_add(name, #name);} void name(int* __errors __attribute__((unused)))
#define FAILED(name) fprintf(stderr, "[ %sFAILED%s ] %s (%s:%d)\n", RED, NEUTRAL, name, __FILE__, __LINE__)
#define PASSED(name) printf("[ %sPASSED%s ] %s\n", GREEN, NEUTRAL, name);
#define ASSERT(stmt) if (!(stmt)) {++(*__errors); FAILED(__func__);}
#endif
|
Use __func__ instead of __FUNCTION__
|
Use __func__ instead of __FUNCTION__
__FUNCTION__ does not work with gcc version 5.
https://gcc.gnu.org/gcc-5/porting_to.html.
|
C
|
bsd-3-clause
|
rbruggem/mqlog,rbruggem/mqlog
|
c49c6113ab8ca9293cad0fc766c6b4bd90e22a75
|
test/small1/strloop.c
|
test/small1/strloop.c
|
#include <testharness.h>
#include <stdio.h>
void BuildWord(char * pchWord) {
int i;
char * pch = pchWord;
/* original code:
* while ((i = *pch++) != '\0') { }
*/
do {
i = *pch;
pch++;
} while (i != '\0');
printf("%s\n",pchWord);
}
int main() {
char *test = "foo";
BuildWord(test);
SUCCESS;
}
|
#include <testharness.h>
#include <stdio.h>
void BuildWord(char * pchWord) {
int i;
char * pch = pchWord;
/* original code:
* while ((i = *pch++) != '\0') { }
*/
do {
i = *pch;
// printf("i = '%c'\n",i);
pch++;
} while (i != '\0');
printf("%s\n",pchWord);
}
int main() {
char *test = "foo";
test++;
test--;
BuildWord(test);
SUCCESS;
}
|
Switch the world over to the new 'paper' solver. Local regression tests indicate that it shouldn't be that bad: new models and wrappers have been added to support it. INFERBOX=infer is now the new solver, INFERBOX=old gives the old behavior (will be removed later).
|
Switch the world over to the new 'paper' solver. Local regression tests
indicate that it shouldn't be that bad: new models and wrappers have been
added to support it. INFERBOX=infer is now the new solver, INFERBOX=old
gives the old behavior (will be removed later).
|
C
|
bsd-3-clause
|
samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c,samuelhavron/obliv-c
|
d28671f7429cc1f47346d9eb5451bc36cbc9f15d
|
src/zt_stdint.h
|
src/zt_stdint.h
|
#ifndef _ZT_STDINT_H_
#define _ZT_STDINT_H_
#if !defined(_MSC_VER) || _MSC_VER >= 1600
#include <stdint.h>
#else
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
#endif
|
#ifndef _ZT_STDINT_H_
#define _ZT_STDINT_H_
#if !defined(_MSC_VER) || _MSC_VER >= 1600
#include <stdint.h>
#else
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#endif
#endif
|
Use integer types that are consistent with what tend to be the underlying types for stdint typedefs
|
Use integer types that are consistent with what tend to be the
underlying types for stdint typedefs
Windows treats signed char and __int8 as distinct types.
|
C
|
mit
|
zerotao/libzt,zerotao/libzt,zerotao/libzt,zerotao/libzt
|
cd22627f781080fb245dd6999f2158c8099379b0
|
py/mpconfig.h
|
py/mpconfig.h
|
// This file contains default configuration settings for MicroPython.
// You can override any of these options using mpconfigport.h file located
// in a directory of your port.
#include <mpconfigport.h>
#ifndef INT_FMT
// printf format spec to use for machine_int_t and friends
#ifdef __LP64__
// Archs where machine_int_t == long, long != int
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
// Archs where machine_int_t == int
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#endif //INT_FMT
// Any options not explicitly set in mpconfigport.h will get default
// values below.
// Whether to collect memory allocation stats
#ifndef MICROPY_MEM_STATS
#define MICROPY_MEM_STATS (1)
#endif
|
// This file contains default configuration settings for MicroPython.
// You can override any of these options using mpconfigport.h file located
// in a directory of your port.
#include <mpconfigport.h>
#ifndef INT_FMT
// printf format spec to use for machine_int_t and friends
#ifdef __LP64__
// Archs where machine_int_t == long, long != int
#define UINT_FMT "%lu"
#define INT_FMT "%ld"
#else
// Archs where machine_int_t == int
#define UINT_FMT "%u"
#define INT_FMT "%d"
#endif
#endif //INT_FMT
// Any options not explicitly set in mpconfigport.h will get default
// values below.
// Whether to collect memory allocation stats
#ifndef MICROPY_MEM_STATS
#define MICROPY_MEM_STATS (1)
#endif
// Whether to support slice object and correspondingly
// slice subscript operators
#ifndef MICROPY_ENABLE_SLICE
#define MICROPY_ENABLE_SLICE (1)
#endif
|
Enable slice support in config.
|
Enable slice support in config.
|
C
|
mit
|
SHA2017-badge/micropython-esp32,selste/micropython,xyb/micropython,xuxiaoxin/micropython,suda/micropython,KISSMonX/micropython,ceramos/micropython,orionrobots/micropython,trezor/micropython,adafruit/micropython,blmorris/micropython,SungEun-Steve-Kim/test-mp,ericsnowcurrently/micropython,praemdonck/micropython,cloudformdesign/micropython,hiway/micropython,oopy/micropython,oopy/micropython,infinnovation/micropython,stonegithubs/micropython,AriZuu/micropython,alex-robbins/micropython,lbattraw/micropython,Timmenem/micropython,ericsnowcurrently/micropython,danicampora/micropython,mgyenik/micropython,puuu/micropython,alex-march/micropython,dhylands/micropython,kostyll/micropython,dxxb/micropython,cwyark/micropython,infinnovation/micropython,misterdanb/micropython,firstval/micropython,mianos/micropython,jlillest/micropython,jmarcelino/pycom-micropython,firstval/micropython,pfalcon/micropython,vriera/micropython,drrk/micropython,vitiral/micropython,cloudformdesign/micropython,mhoffma/micropython,alex-march/micropython,selste/micropython,martinribelotta/micropython,pfalcon/micropython,mgyenik/micropython,emfcamp/micropython,EcmaXp/micropython,MrSurly/micropython,noahchense/micropython,drrk/micropython,tdautc19841202/micropython,adafruit/circuitpython,warner83/micropython,oopy/micropython,skybird6672/micropython,warner83/micropython,xuxiaoxin/micropython,tobbad/micropython,pramasoul/micropython,dmazzella/micropython,toolmacher/micropython,xhat/micropython,blazewicz/micropython,ryannathans/micropython,swegener/micropython,ganshun666/micropython,suda/micropython,vriera/micropython,heisewangluo/micropython,ganshun666/micropython,cwyark/micropython,Vogtinator/micropython,feilongfl/micropython,MrSurly/micropython-esp32,neilh10/micropython,HenrikSolver/micropython,noahwilliamsson/micropython,blazewicz/micropython,blmorris/micropython,ahotam/micropython,henriknelson/micropython,lbattraw/micropython,vriera/micropython,paul-xxx/micropython,mianos/micropython,adamkh/micropython,slzatz/micropython,lowRISC/micropython,galenhz/micropython,Vogtinator/micropython,redbear/micropython,kerneltask/micropython,hosaka/micropython,vitiral/micropython,orionrobots/micropython,alex-march/micropython,chrisdearman/micropython,adafruit/micropython,firstval/micropython,swegener/micropython,alex-march/micropython,misterdanb/micropython,utopiaprince/micropython,alex-march/micropython,mianos/micropython,tobbad/micropython,praemdonck/micropython,dinau/micropython,deshipu/micropython,omtinez/micropython,Peetz0r/micropython-esp32,SungEun-Steve-Kim/test-mp,turbinenreiter/micropython,ceramos/micropython,stonegithubs/micropython,ryannathans/micropython,EcmaXp/micropython,heisewangluo/micropython,drrk/micropython,pfalcon/micropython,adafruit/circuitpython,micropython/micropython-esp32,orionrobots/micropython,hosaka/micropython,redbear/micropython,methoxid/micropystat,suda/micropython,lowRISC/micropython,skybird6672/micropython,methoxid/micropystat,henriknelson/micropython,supergis/micropython,pozetroninc/micropython,kerneltask/micropython,omtinez/micropython,ahotam/micropython,puuu/micropython,cwyark/micropython,HenrikSolver/micropython,adafruit/circuitpython,adafruit/micropython,vriera/micropython,xhat/micropython,xyb/micropython,utopiaprince/micropython,alex-robbins/micropython,PappaPeppar/micropython,ceramos/micropython,toolmacher/micropython,kostyll/micropython,rubencabrera/micropython,cwyark/micropython,aitjcize/micropython,ryannathans/micropython,EcmaXp/micropython,skybird6672/micropython,oopy/micropython,ceramos/micropython,turbinenreiter/micropython,pramasoul/micropython,MrSurly/micropython,mhoffma/micropython,cwyark/micropython,mhoffma/micropython,blmorris/micropython,vitiral/micropython,infinnovation/micropython,mgyenik/micropython,misterdanb/micropython,bvernoux/micropython,puuu/micropython,ChuckM/micropython,alex-robbins/micropython,vriera/micropython,ChuckM/micropython,skybird6672/micropython,trezor/micropython,supergis/micropython,ernesto-g/micropython,torwag/micropython,tdautc19841202/micropython,mianos/micropython,ganshun666/micropython,dmazzella/micropython,aitjcize/micropython,rubencabrera/micropython,TDAbboud/micropython,tdautc19841202/micropython,aethaniel/micropython,methoxid/micropystat,neilh10/micropython,toolmacher/micropython,ruffy91/micropython,kostyll/micropython,dhylands/micropython,slzatz/micropython,mpalomer/micropython,adafruit/circuitpython,lowRISC/micropython,SHA2017-badge/micropython-esp32,chrisdearman/micropython,Timmenem/micropython,ahotam/micropython,pozetroninc/micropython,torwag/micropython,jimkmc/micropython,micropython/micropython-esp32,dinau/micropython,matthewelse/micropython,praemdonck/micropython,kerneltask/micropython,henriknelson/micropython,ceramos/micropython,aitjcize/micropython,ernesto-g/micropython,skybird6672/micropython,aethaniel/micropython,noahchense/micropython,redbear/micropython,emfcamp/micropython,hiway/micropython,trezor/micropython,noahwilliamsson/micropython,ruffy91/micropython,AriZuu/micropython,mgyenik/micropython,torwag/micropython,swegener/micropython,Peetz0r/micropython-esp32,KISSMonX/micropython,dxxb/micropython,infinnovation/micropython,ChuckM/micropython,stonegithubs/micropython,galenhz/micropython,tobbad/micropython,praemdonck/micropython,mhoffma/micropython,tobbad/micropython,deshipu/micropython,SungEun-Steve-Kim/test-mp,MrSurly/micropython,HenrikSolver/micropython,orionrobots/micropython,slzatz/micropython,SHA2017-badge/micropython-esp32,noahwilliamsson/micropython,tuc-osg/micropython,warner83/micropython,tuc-osg/micropython,emfcamp/micropython,xuxiaoxin/micropython,PappaPeppar/micropython,rubencabrera/micropython,adamkh/micropython,Timmenem/micropython,warner83/micropython,paul-xxx/micropython,toolmacher/micropython,ernesto-g/micropython,mpalomer/micropython,ernesto-g/micropython,xhat/micropython,micropython/micropython-esp32,martinribelotta/micropython,Timmenem/micropython,ahotam/micropython,deshipu/micropython,hiway/micropython,Vogtinator/micropython,jlillest/micropython,noahchense/micropython,aitjcize/micropython,noahchense/micropython,suda/micropython,cnoviello/micropython,methoxid/micropystat,martinribelotta/micropython,xuxiaoxin/micropython,deshipu/micropython,utopiaprince/micropython,SHA2017-badge/micropython-esp32,supergis/micropython,galenhz/micropython,MrSurly/micropython-esp32,galenhz/micropython,heisewangluo/micropython,kerneltask/micropython,danicampora/micropython,trezor/micropython,chrisdearman/micropython,alex-robbins/micropython,utopiaprince/micropython,stonegithubs/micropython,jmarcelino/pycom-micropython,jimkmc/micropython,cloudformdesign/micropython,paul-xxx/micropython,vitiral/micropython,MrSurly/micropython-esp32,EcmaXp/micropython,mpalomer/micropython,TDAbboud/micropython,blazewicz/micropython,chrisdearman/micropython,paul-xxx/micropython,TDAbboud/micropython,blmorris/micropython,Vogtinator/micropython,dhylands/micropython,PappaPeppar/micropython,cloudformdesign/micropython,emfcamp/micropython,adafruit/circuitpython,trezor/micropython,xyb/micropython,jmarcelino/pycom-micropython,feilongfl/micropython,drrk/micropython,dinau/micropython,adamkh/micropython,methoxid/micropystat,pfalcon/micropython,xhat/micropython,ruffy91/micropython,warner83/micropython,tuc-osg/micropython,PappaPeppar/micropython,PappaPeppar/micropython,neilh10/micropython,tobbad/micropython,henriknelson/micropython,adafruit/circuitpython,SungEun-Steve-Kim/test-mp,pramasoul/micropython,bvernoux/micropython,infinnovation/micropython,HenrikSolver/micropython,Vogtinator/micropython,redbear/micropython,HenrikSolver/micropython,xyb/micropython,jimkmc/micropython,dinau/micropython,alex-robbins/micropython,neilh10/micropython,feilongfl/micropython,ericsnowcurrently/micropython,AriZuu/micropython,aethaniel/micropython,pfalcon/micropython,cnoviello/micropython,hosaka/micropython,kostyll/micropython,tralamazza/micropython,henriknelson/micropython,ryannathans/micropython,lbattraw/micropython,drrk/micropython,matthewelse/micropython,praemdonck/micropython,blazewicz/micropython,jlillest/micropython,utopiaprince/micropython,danicampora/micropython,noahwilliamsson/micropython,SHA2017-badge/micropython-esp32,dmazzella/micropython,paul-xxx/micropython,omtinez/micropython,dxxb/micropython,emfcamp/micropython,SungEun-Steve-Kim/test-mp,neilh10/micropython,lowRISC/micropython,galenhz/micropython,tralamazza/micropython,jlillest/micropython,kerneltask/micropython,matthewelse/micropython,jimkmc/micropython,TDAbboud/micropython,lbattraw/micropython,ChuckM/micropython,misterdanb/micropython,tdautc19841202/micropython,rubencabrera/micropython,chrisdearman/micropython,jimkmc/micropython,aethaniel/micropython,TDAbboud/micropython,dhylands/micropython,jlillest/micropython,MrSurly/micropython-esp32,micropython/micropython-esp32,Peetz0r/micropython-esp32,slzatz/micropython,tdautc19841202/micropython,supergis/micropython,mgyenik/micropython,blazewicz/micropython,turbinenreiter/micropython,hosaka/micropython,cnoviello/micropython,xhat/micropython,AriZuu/micropython,danicampora/micropython,EcmaXp/micropython,cloudformdesign/micropython,turbinenreiter/micropython,supergis/micropython,xyb/micropython,ChuckM/micropython,omtinez/micropython,slzatz/micropython,cnoviello/micropython,hiway/micropython,misterdanb/micropython,mpalomer/micropython,adafruit/micropython,dmazzella/micropython,swegener/micropython,selste/micropython,rubencabrera/micropython,mhoffma/micropython,matthewelse/micropython,suda/micropython,ahotam/micropython,redbear/micropython,ericsnowcurrently/micropython,kostyll/micropython,deshipu/micropython,martinribelotta/micropython,xuxiaoxin/micropython,ganshun666/micropython,adamkh/micropython,ruffy91/micropython,bvernoux/micropython,MrSurly/micropython,adafruit/micropython,tuc-osg/micropython,cnoviello/micropython,swegener/micropython,Peetz0r/micropython-esp32,tralamazza/micropython,hiway/micropython,dhylands/micropython,bvernoux/micropython,tralamazza/micropython,hosaka/micropython,martinribelotta/micropython,dxxb/micropython,selste/micropython,noahwilliamsson/micropython,MrSurly/micropython-esp32,matthewelse/micropython,heisewangluo/micropython,ernesto-g/micropython,lbattraw/micropython,pramasoul/micropython,AriZuu/micropython,mpalomer/micropython,ryannathans/micropython,KISSMonX/micropython,feilongfl/micropython,heisewangluo/micropython,KISSMonX/micropython,matthewelse/micropython,torwag/micropython,adamkh/micropython,lowRISC/micropython,bvernoux/micropython,ruffy91/micropython,dxxb/micropython,tuc-osg/micropython,pozetroninc/micropython,feilongfl/micropython,Timmenem/micropython,micropython/micropython-esp32,ganshun666/micropython,puuu/micropython,mianos/micropython,ericsnowcurrently/micropython,orionrobots/micropython,jmarcelino/pycom-micropython,vitiral/micropython,torwag/micropython,pozetroninc/micropython,oopy/micropython,Peetz0r/micropython-esp32,firstval/micropython,danicampora/micropython,turbinenreiter/micropython,omtinez/micropython,blmorris/micropython,selste/micropython,pozetroninc/micropython,stonegithubs/micropython,firstval/micropython,puuu/micropython,MrSurly/micropython,noahchense/micropython,pramasoul/micropython,jmarcelino/pycom-micropython,KISSMonX/micropython,dinau/micropython,toolmacher/micropython,aethaniel/micropython
|
b883b10aef5ff23e7ad6c9342b5d27db26632837
|
lib/schedule/index.c
|
lib/schedule/index.c
|
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <area51/hashmap.h>
#include <area51/list.h>
#include <area51/log.h>
#include <libxml/xmlreader.h>
#include <nre/reference.h>
#include <nre/schedule.h>
/*
* Callback to add a schedule to the crs locations map
*/
static bool indexAll(void *k, void *v, void *c) {
int *ridId = k;
struct Schedule *sched = v;
struct Schedules *s = c;
Node *n = list_getHead(&sched->locations);
while (list_isNode(n)) {
struct SchedLoc *sl = (struct SchedLoc *) n;
n = list_getNext(n);
struct LocationRef *l = hashmapGet(s->ref->tiploc, &sl->tpl);
if (l && l->crs > 0)
hashmapAddList(s->crs, &l->crs, s);
}
return true;
}
/**
* Index all schedules adding them to the crs hashmap so we have a list of entries for each station
* @param s
*/
void indexSchedules(struct Schedules *s) {
logconsole("Indexing %d schedules", hashmapSize(s->schedules));
// Run through each crs
hashmapForEach(s->schedules, indexAll, s);
}
|
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <area51/hashmap.h>
#include <area51/list.h>
#include <area51/log.h>
#include <nre/reference.h>
#include <nre/schedule.h>
/*
* Callback to add a schedule to the crs locations map
*/
static bool indexAll(void *k, void *v, void *c) {
int *ridId = k;
struct Schedule *sched = v;
struct Schedules *s = c;
Node *n = list_getHead(&sched->locations);
while (list_isNode(n)) {
struct SchedLoc *sl = (struct SchedLoc *) n;
n = list_getNext(n);
struct LocationRef *l = hashmapGet(s->ref->tiploc, &sl->tpl);
if (l && l->crs > 0)
hashmapAddList(s->crs, &l->crs, sched);
}
return true;
}
/**
* Index all schedules adding them to the crs hashmap so we have a list of entries for each station
* @param s
*/
void indexSchedules(struct Schedules *s) {
logconsole("Indexing %d schedules", hashmapSize(s->schedules));
// Run through each crs
hashmapForEach(s->schedules, indexAll, s);
}
|
Index schedule not the main struct
|
Index schedule not the main struct
|
C
|
apache-2.0
|
peter-mount/departureboards,peter-mount/departureboards,peter-mount/departureboards
|
87b199ef6122299199b14b0ed971558b03b97526
|
vm.h
|
vm.h
|
#define TREE
// A mapping of a chunk of an address space to
// a specific memory object.
enum vmatype { PRIVATE, COW};
struct vma {
uptr va_start; // start of mapping
uptr va_end; // one past the last byte
enum vmatype va_type;
struct vmnode *n;
struct spinlock lock; // serialize fault/unmap
char lockname[16];
};
// A memory object (physical pages or inode).
enum vmntype { EAGER, ONDEMAND};
struct vmnode {
u64 npages;
char *page[128];
u64 ref;
enum vmntype type;
struct inode *ip;
u64 offset;
u64 sz;
};
// An address space: a set of vmas plus h/w page table.
// The elements of e[] are not ordered by address.
struct vmap {
#ifdef TREE
// struct node* root;
struct crange* cr;
#else
struct vma* e[16];
#endif
struct spinlock lock; // serialize map/lookup/unmap
u64 ref;
u64 alloc;
pml4e_t *pml4; // Page table
char lockname[16];
};
|
//#define TREE
// A mapping of a chunk of an address space to
// a specific memory object.
enum vmatype { PRIVATE, COW};
struct vma {
uptr va_start; // start of mapping
uptr va_end; // one past the last byte
enum vmatype va_type;
struct vmnode *n;
struct spinlock lock; // serialize fault/unmap
char lockname[16];
};
// A memory object (physical pages or inode).
enum vmntype { EAGER, ONDEMAND};
struct vmnode {
u64 npages;
char *page[128];
u64 ref;
enum vmntype type;
struct inode *ip;
u64 offset;
u64 sz;
};
// An address space: a set of vmas plus h/w page table.
// The elements of e[] are not ordered by address.
struct vmap {
#ifdef TREE
// struct node* root;
struct crange* cr;
#else
struct vma* e[16];
#endif
struct spinlock lock; // serialize map/lookup/unmap
u64 ref;
u64 alloc;
pml4e_t *pml4; // Page table
char lockname[16];
};
|
Disable crange while fixing bugs in other systems.
|
Disable crange while fixing bugs in other systems.
|
C
|
mit
|
aclements/sv6,bowlofstew/sv6,bowlofstew/sv6,aclements/sv6,bowlofstew/sv6,aclements/sv6,aclements/sv6,aclements/sv6,bowlofstew/sv6,bowlofstew/sv6
|
c7ec6be4fb2c243155bcba7a41262fe683933ea9
|
sys/sys/snoop.h
|
sys/sys/snoop.h
|
/*
* Copyright (c) 1995 Ugen J.S.Antsilevich
*
* Redistribution and use in source forms, with and without modification,
* are permitted provided that this entire comment appears intact.
*
* Redistribution in binary form may occur without any restrictions.
* Obviously, it would be nice if you gave credit where credit is due
* but requiring it would be too onerous.
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
* Snoop stuff.
*
* $FreeBSD$
*/
#ifndef _SYS_SNOOP_H_
#define _SYS_SNOOP_H_
#include <sys/ioccom.h>
/*
* Theese are snoop io controls
* SNPSTTY accepts 'struct snptty' as input.
* If ever type or unit set to -1,snoop device
* detached from its current tty.
*/
#define SNPSTTY _IOW('T', 90, dev_t)
#define SNPGTTY _IOR('T', 89, dev_t)
/*
* Theese values would be returned by FIONREAD ioctl
* instead of number of characters in buffer in case
* of specific errors.
*/
#define SNP_OFLOW -1
#define SNP_TTYCLOSE -2
#define SNP_DETACH -3
#endif /* !_SYS_SNOOP_H_ */
|
/*
* Copyright (c) 1995 Ugen J.S.Antsilevich
*
* Redistribution and use in source forms, with and without modification,
* are permitted provided that this entire comment appears intact.
*
* Redistribution in binary form may occur without any restrictions.
* Obviously, it would be nice if you gave credit where credit is due
* but requiring it would be too onerous.
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
* Snoop stuff.
*
* $FreeBSD$
*/
#ifndef _SYS_SNOOP_H_
#define _SYS_SNOOP_H_
#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>
/*
* Theese are snoop io controls
* SNPSTTY accepts 'struct snptty' as input.
* If ever type or unit set to -1,snoop device
* detached from its current tty.
*/
#define SNPSTTY _IOW('T', 90, dev_t)
#define SNPGTTY _IOR('T', 89, dev_t)
/*
* Theese values would be returned by FIONREAD ioctl
* instead of number of characters in buffer in case
* of specific errors.
*/
#define SNP_OFLOW -1
#define SNP_TTYCLOSE -2
#define SNP_DETACH -3
#endif /* !_SYS_SNOOP_H_ */
|
Include <sys/types.h> in the !_KERNEL case so that this file is self-sufficient in that case (it needs dev_t). This is normal pollution for most headers that define ioctl numbers.
|
Include <sys/types.h> in the !_KERNEL case so that this file is
self-sufficient in that case (it needs dev_t). This is normal pollution
for most headers that define ioctl numbers.
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
02139c2e5a05287105b41c9a418f2a6f848d484d
|
src/clientversion.h
|
src/clientversion.h
|
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 0
// 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
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0
// 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
|
Revert "client version to 1.0.1"
|
Revert "client version to 1.0.1"
This reverts commit 4d1baddde849c46969e1d189224cc1a507c33b01.
|
C
|
mit
|
boxxa/SMAC,boxxa/SMAC,boxxa/SMAC,boxxa/SMAC,boxxa/SMAC
|
efb2710d75e39e0297d88636001c43185a92c407
|
vector/Dot.h
|
vector/Dot.h
|
//#####################################################################
// Function Dot
//#####################################################################
#pragma once
namespace other {
template<class T,int d> class Vector;
inline float dot(const float a1,const float a2)
{return a1*a2;}
inline double dot(const double a1,const double a2)
{return a1*a2;}
template<class T,int d>
inline double dot_double_precision(const Vector<T,d>& v1,const Vector<T,d>& v2)
{return dot(v1,v2);}
inline double dot_double_precision(const float a1,const float a2)
{return a1*a2;}
inline double dot_double_precision(const double a1,const double a2)
{return a1*a2;}
}
|
//#####################################################################
// Function Dot
//#####################################################################
#pragma once
namespace other {
template<class T,int d> class Vector;
static inline float dot(const float a1,const float a2)
{return a1*a2;}
static inline double dot(const double a1,const double a2)
{return a1*a2;}
template<class T,int d>
static inline double dot_double_precision(const Vector<T,d>& v1,const Vector<T,d>& v2)
{return dot(v1,v2);}
static inline double dot_double_precision(const float a1,const float a2)
{return a1*a2;}
static inline double dot_double_precision(const double a1,const double a2)
{return a1*a2;}
}
|
Mark some functions static inline
|
vector/dot: Mark some functions static inline
|
C
|
bsd-3-clause
|
omco/geode,mikest/geode,omco/geode,mikest/geode,mikest/geode,omco/geode,omco/geode,mikest/geode
|
ad315659a48175b2875adc400413808a68d951ca
|
src/libaten/types.h
|
src/libaten/types.h
|
#pragma once
#include <stdint.h>
#include <climits>
//#define TYPE_DOUBLE
#ifdef TYPE_DOUBLE
using real = double;
#else
using real = float;
#endif
|
#pragma once
#include <stdint.h>
#include <climits>
//#define TYPE_DOUBLE
#ifdef TYPE_DOUBLE
using real = double;
#define AT_IS_TYPE_DOUBLE (true)
#else
using real = float;
#define AT_IS_TYPE_DOUBLE (false)
#endif
|
Add macro to know if "real" is double.
|
Add macro to know if "real" is double.
|
C
|
mit
|
nakdai/aten,nakdai/aten
|
93c2f9bd8b058b28016e6db2421e5b38eac0606c
|
src/unionfs.h
|
src/unionfs.h
|
/*
* License: BSD-style license
* Copyright: Radek Podgorny <radek@podgorny.cz>,
* Bernd Schubert <bernd-schubert@gmx.de>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METANAME ".unionfs-fuse"
#define METADIR (METANAME "/") // string concetanation!
// fuse meta files, we might want to hide those
#define FUSE_META_FILE ".fuse_hidden"
#define FUSE_META_LENGTH 12
// file access protection mask
#define S_PROT_MASK (S_ISUID| S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
typedef struct {
char *path;
int path_len; // strlen(path)
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
#endif
|
/*
* License: BSD-style license
* Copyright: Radek Podgorny <radek@podgorny.cz>,
* Bernd Schubert <bernd-schubert@gmx.de>
*/
#ifndef UNIONFS_H
#define UNIONFS_H
#define PATHLEN_MAX 1024
#define HIDETAG "_HIDDEN~"
#define METANAME ".unionfs"
#define METADIR (METANAME "/") // string concetanation!
// fuse meta files, we might want to hide those
#define FUSE_META_FILE ".fuse_hidden"
#define FUSE_META_LENGTH 12
// file access protection mask
#define S_PROT_MASK (S_ISUID| S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
typedef struct {
char *path;
int path_len; // strlen(path)
int fd; // used to prevent accidental umounts of path
unsigned char rw; // the writable flag
} branch_entry_t;
#endif
|
Revert to old pre-1.0 meta directory
|
Revert to old pre-1.0 meta directory
Unionfs changed its meta directory from .unionfs to .unionfs-fuse with the
unionfs -> unionfs-fuse rename. The rename later got reverted everywhere
but the meta directory, so now unionfs doesn't find the whiteout files from
older releases.
Revert back to the pre-1.0 behaviour to fix this.
Signed-off-by: Peter Korsgaard <4b8373d016f277527198385ba72fda0feb5da015@korsgaard.com>
|
C
|
bsd-3-clause
|
evnu/unionfs-fuse,evnu/unionfs-fuse,yogoloth/unionfs-fuse,yogoloth/unionfs-fuse,yogoloth/unionfs-fuse,evnu/unionfs-fuse
|
a1a426ea206ffa5ad8aea089f7d70d8d04a3a210
|
crypto/opensslv.h
|
crypto/opensslv.h
|
#ifndef HEADER_OPENSSLV_H
#define HEADER_OPENSSLV_H
/* Numeric release version identifier:
* MMNNFFRBB: major minor fix final beta/patch
* For example:
* 0.9.3-dev 0x00903000
* 0.9.3beta1 0x00903001
* 0.9.3beta2-dev 0x00903002
* 0.9.3beta2 0x00903002 (same as ...beta2-dev)
* 0.9.3 0x00903100
* 0.9.3a 0x00903101
* 0.9.4 0x00904100
* 1.2.3z 0x1020311a
* (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
*/
#define OPENSSL_VERSION_NUMBER 0x00905002L
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.5beta2-dev 24 Feb 2000"
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
#endif /* HEADER_OPENSSLV_H */
|
#ifndef HEADER_OPENSSLV_H
#define HEADER_OPENSSLV_H
/* Numeric release version identifier:
* MMNNFFRBB: major minor fix final beta/patch
* For example:
* 0.9.3-dev 0x00903000
* 0.9.3beta1 0x00903001
* 0.9.3beta2-dev 0x00903002
* 0.9.3beta2 0x00903002 (same as ...beta2-dev)
* 0.9.3 0x00903100
* 0.9.3a 0x00903101
* 0.9.4 0x00904100
* 1.2.3z 0x1020311a
* (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)
*/
#define OPENSSL_VERSION_NUMBER 0x00905002L
#define OPENSSL_VERSION_TEXT "OpenSSL 0.9.5beta2 27 Feb 2000"
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
#endif /* HEADER_OPENSSLV_H */
|
Change version string to reflect the release of beta 2.
|
Change version string to reflect the release of beta 2.
|
C
|
apache-2.0
|
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl
|
545ae42ea7d0489da564dd61fd3b1b18bf0ebe9c
|
kernel/arch/x86/boot/boot.h
|
kernel/arch/x86/boot/boot.h
|
#ifndef __BOOT_H__
#define __BOOT_H__
/* multiboot definitions */
#define MB_HEADER_MAGIC 0x1BADB002
#define MB_BOOT_MAGIC 0x2BADB002
#define MB_PAGE_ALIGN 0x00000001
#define MB_MEMORY_INFO 0x00000002
/* common boot definitions */
#define BOOT_TIME_STACK_SIZE 0x4000
#endif /*__BOOT_H__*/
|
#ifndef __BOOT_H__
#define __BOOT_H__
/* multiboot definitions */
#define MB_HEADER_MAGIC 0x1BADB002
#define MB_BOOT_MAGIC 0x2BADB002
#define MB_PAGE_ALIGN 0x00000001
#define MB_MEMORY_INFO 0x00000002
/* common boot definitions */
#define BOOT_TIME_STACK_SIZE 0x4000
#define BOOT_CS_ENTRY 1
#define BOOT_CS (BOOT_CS_ENTRY << 3)
#define BOOT_DS_ENTRY 2
#define BOOT_DS (BOOT_DS_ENTRY << 3)
#define PTE_INIT_ATTR 0x00000003
#define PDE_INIT_ATTR 0x00000003
#endif /*__BOOT_H__*/
|
Add code and data segments definitions.
|
Add code and data segments definitions.
This patch adds boot time data and code segments definitions.
|
C
|
mit
|
krinkinmu/auos,krinkinmu/auos,krinkinmu/auos,krinkinmu/auos
|
4c1fdd21e54c1a7192b4c84a15f88361af466894
|
autotests/vktestbase.h
|
autotests/vktestbase.h
|
/*
* Unit tests for libkvkontakte.
* Copyright (C) 2015 Alexander Potashev <aspotashev@gmail.com>
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef VKTESTBASE_H
#define VKTESTBASE_H
#include <libkvkontakte/apppermissions.h>
#include <QtCore/QObject>
#include <QtCore/QVector>
namespace Vkontakte {
class VkApi;
}
class VkTestBase : public QObject
{
Q_OBJECT
public:
VkTestBase();
~VkTestBase();
protected:
void authenticate(Vkontakte::AppPermissions::Value permissions);
QString accessToken() const;
private:
QString getSavedToken() const;
Vkontakte::VkApi *m_vkapi;
};
#endif // VKTESTBASE_H
|
/*
* Unit tests for libkvkontakte.
* Copyright (C) 2015 Alexander Potashev <aspotashev@gmail.com>
*
* 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef VKTESTBASE_H
#define VKTESTBASE_H
#include <libkvkontakte/apppermissions.h>
#include <QtCore/QObject>
#include <QtCore/QVector>
namespace Vkontakte {
class VkApi;
}
class VkTestBase : public QObject
{
Q_OBJECT
public:
VkTestBase();
virtual ~VkTestBase();
protected:
void authenticate(Vkontakte::AppPermissions::Value permissions);
QString accessToken() const;
private:
QString getSavedToken() const;
Vkontakte::VkApi *m_vkapi;
};
#endif // VKTESTBASE_H
|
Fix memory leak by making dtor virtual
|
VkTestBase: Fix memory leak by making dtor virtual
|
C
|
lgpl-2.1
|
KDE/libkvkontakte,KDE/libkvkontakte
|
2257bf9a133c6b5c96c28578fff59910b017f335
|
engine/src/common/pixelboost/graphics/device/vertexBuffer.h
|
engine/src/common/pixelboost/graphics/device/vertexBuffer.h
|
#pragma once
#include "pixelboost/graphics/device/bufferFormats.h"
namespace pb
{
class GraphicsDevice;
struct Vertex_P3
{
float position[3];
float __padding;
};
struct Vertex_P3_UV
{
float position[3];
float uv[2];
float __padding[3]; // for 32-byte alignment
};
struct Vertex_P3_C4
{
float position[3];
float color[4];
};
struct Vertex_P3_C4_UV
{
float position[3];
float uv[2];
float color[4];
float __padding[2]; // for 48-byte alignment
};
struct Vertex_P3_N3_UV
{
float position[3];
float normal[3];
float uv[2];
};
struct Vertex_P3_N3_UV_BW
{
float position[3];
float normal[3];
float uv[2];
char bones[4];
float boneWeights[4];
};
class VertexBuffer
{
protected:
VertexBuffer(GraphicsDevice* device, BufferFormat bufferFormat, VertexFormat vertexFormat, int maxSize);
~VertexBuffer();
public:
BufferFormat GetBufferFormat();
VertexFormat GetVertexFormat();
int GetMaxSize();
int GetCurrentSize();
void* GetData();
void Lock();
void Unlock(int numElements=-1);
private:
GraphicsDevice* _Device;
BufferFormat _BufferFormat;
VertexFormat _VertexFormat;
int _MaxSize;
int _CurrentSize;
void* _Data;
int _Locked;
friend class GraphicsDevice;
};
}
|
#pragma once
#include "pixelboost/graphics/device/bufferFormats.h"
namespace pb
{
class GraphicsDevice;
struct Vertex_P3
{
float position[3];
};
struct Vertex_P3_UV
{
float position[3];
float uv[2];
};
struct Vertex_P3_C4
{
float position[3];
float color[4];
};
struct Vertex_P3_C4_UV
{
float position[3];
float uv[2];
float color[4];
};
struct Vertex_P3_N3_UV
{
float position[3];
float normal[3];
float uv[2];
};
struct Vertex_P3_N3_UV_BW
{
float position[3];
float normal[3];
float uv[2];
char bones[4];
float boneWeights[4];
};
class VertexBuffer
{
protected:
VertexBuffer(GraphicsDevice* device, BufferFormat bufferFormat, VertexFormat vertexFormat, int maxSize);
~VertexBuffer();
public:
BufferFormat GetBufferFormat();
VertexFormat GetVertexFormat();
int GetMaxSize();
int GetCurrentSize();
void* GetData();
void Lock();
void Unlock(int numElements=-1);
private:
GraphicsDevice* _Device;
BufferFormat _BufferFormat;
VertexFormat _VertexFormat;
int _MaxSize;
int _CurrentSize;
void* _Data;
int _Locked;
friend class GraphicsDevice;
};
}
|
Remove padding from vertex buffers
|
Remove padding from vertex buffers
|
C
|
mit
|
pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost
|
5d7f99083bba3bf34f6fc715683b33989842c0c2
|
docs/example/example.c
|
docs/example/example.c
|
#include <chopsui.h>
void say_hi_clicked(sui_t *button, sui_event_t *event) {
sui_alert("Hello world!");
}
void exit_clicked(sui_t *button, sui_event_t *event) {
sui_exit();
}
int main(int argc, char **argv) {
init_sui();
sui_t *window = sui_load("window.sui");
sui_load_css("window.css");
sui_add_handler(window, exit_clicked);
sui_add_handler(window, say_hi_clicked);
sui_show(window);
sui_run();
return 0;
}
|
#include <chopsui.h>
void say_hi_clicked(sui_t *button, sui_event_t *event) {
sui_alert("Hello world!");
}
void exit_clicked(sui_t *button, sui_event_t *event) {
sui_exit();
}
int main(int argc, char **argv) {
init_sui();
sui_t *window = sui_load("window.sui");
sui_css_t *css = sui_load_css("window.css");
sui_add_handler(window, exit_clicked);
sui_add_handler(window, say_hi_clicked);
sui_style(window, css);
sui_show(window);
sui_run();
return 0;
}
|
Change how CSS would be used
|
Change how CSS would be used
|
C
|
mit
|
GrayHatter/chopsui,GrayHatter/chopsui
|
b814282dc2db635d31fbe219e99a423337aa2dbf
|
alsa.c
|
alsa.c
|
#include <alsa/asoundlib.h>
snd_seq_t *hdl;
static snd_midi_event_t *mbuf;
static int midiport;
/* open */
int
midiopen(void)
{
snd_midi_event_new(32, &mbuf);
if (snd_seq_open(&hdl, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) {
return 1;
} else {
snd_seq_set_client_name(hdl, "svmidi");
if ((midiport = snd_seq_create_simple_port(hdl, "svmidi",
SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ,
SND_SEQ_PORT_TYPE_APPLICATION)) < 0) {
return 1;
}
return 0;
}
}
/* send message */
void
_midisend(unsigned char message[], size_t count)
{
snd_seq_event_t ev;
snd_midi_event_encode(mbuf, message, count, &ev);
snd_seq_ev_set_subs(&ev);
snd_seq_ev_set_direct(&ev);
snd_seq_ev_set_source(&ev, midiport);
snd_seq_event_output_direct(hdl, &ev);
}
/* close */
void
midiclose(void)
{
snd_midi_event_free(mbuf);
snd_seq_close(hdl);
}
|
#include <alsa/asoundlib.h>
snd_seq_t *hdl;
static snd_midi_event_t *mbuf;
static int midiport;
/* open */
int
midiopen(void)
{
snd_midi_event_new(32, &mbuf);
if (snd_seq_open(&hdl, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) {
return 1;
} else {
snd_seq_set_client_name(hdl, "svmidi");
if ((midiport = snd_seq_create_simple_port(hdl, "svmidi",
SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ,
SND_SEQ_PORT_TYPE_APPLICATION)) < 0) {
return 1;
}
return 0;
}
}
/* send message */
void
midisend(unsigned char message[], size_t count)
{
snd_seq_event_t ev;
snd_midi_event_encode(mbuf, message, count, &ev);
snd_seq_ev_set_subs(&ev);
snd_seq_ev_set_direct(&ev);
snd_seq_ev_set_source(&ev, midiport);
snd_seq_event_output_direct(hdl, &ev);
}
/* close */
void
midiclose(void)
{
snd_midi_event_free(mbuf);
snd_seq_close(hdl);
}
|
Fix undefined reference to "midisend" when using ALSA
|
Fix undefined reference to "midisend" when using ALSA
Signed-off-by: Henrique N. Lengler <6cdc851d94ddec54baafad133c2f9a87abb571af@openmailbox.org>
|
C
|
isc
|
henriqueleng/svmidi
|
db3de3779b73a2919c193fa3bd85d1295a0e54ef
|
src/vast/query/search.h
|
src/vast/query/search.h
|
#ifndef VAST_QUERY_SEARCH_H
#define VAST_QUERY_SEARCH_H
#include <unordered_map>
#include <cppa/cppa.hpp>
#include <ze/event.h>
#include <vast/query/query.h>
namespace vast {
namespace query {
class search : public cppa::sb_actor<search>
{
friend class cppa::sb_actor<search>;
public:
search(cppa::actor_ptr archive, cppa::actor_ptr index);
private:
std::vector<cppa::actor_ptr> queries_;
std::multimap<cppa::actor_ptr, cppa::actor_ptr> clients_;
cppa::actor_ptr archive_;
cppa::actor_ptr index_;
cppa::behavior init_state;
};
} // namespace query
} // namespace vast
#endif
|
#ifndef VAST_QUERY_SEARCH_H
#define VAST_QUERY_SEARCH_H
#include <unordered_map>
#include <cppa/cppa.hpp>
#include <ze/event.h>
#include <vast/query/query.h>
namespace vast {
namespace query {
class search : public cppa::sb_actor<search>
{
friend class cppa::sb_actor<search>;
public:
search(cppa::actor_ptr archive, cppa::actor_ptr index);
private:
std::vector<cppa::actor_ptr> queries_;
std::unordered_multimap<cppa::actor_ptr, cppa::actor_ptr> clients_;
cppa::actor_ptr archive_;
cppa::actor_ptr index_;
cppa::behavior init_state;
};
} // namespace query
} // namespace vast
#endif
|
Use an unordered map to track clients.
|
Use an unordered map to track clients.
|
C
|
bsd-3-clause
|
pmos69/vast,mavam/vast,vast-io/vast,vast-io/vast,pmos69/vast,pmos69/vast,mavam/vast,vast-io/vast,mavam/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast
|
7967b5fd99e3f157711648a26a2aa309c60cf842
|
src/util/util_time.h
|
src/util/util_time.h
|
/*
* Copyright 2011-2013 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UTIL_TIME_H__
#define __UTIL_TIME_H__
CCL_NAMESPACE_BEGIN
/* Give current time in seconds in double precision, with good accuracy. */
double time_dt();
/* Sleep for the specified number of seconds */
void time_sleep(double t);
class scoped_timer {
public:
scoped_timer(double *value) : value_(value)
{
if(value_ != NULL) {
time_start_ = time_dt();
}
}
~scoped_timer()
{
if(value_ != NULL) {
*value_ = time_dt() - time_start_;
}
}
protected:
double *value_;
double time_start_;
};
CCL_NAMESPACE_END
#endif
|
/*
* Copyright 2011-2013 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __UTIL_TIME_H__
#define __UTIL_TIME_H__
CCL_NAMESPACE_BEGIN
/* Give current time in seconds in double precision, with good accuracy. */
double time_dt();
/* Sleep for the specified number of seconds */
void time_sleep(double t);
class scoped_timer {
public:
scoped_timer(double *value) : value_(value)
{
time_start_ = time_dt();
}
~scoped_timer()
{
if(value_ != NULL) {
*value_ = time_dt() - time_start_;
}
}
protected:
double *value_;
double time_start_;
};
CCL_NAMESPACE_END
#endif
|
Fix Uninitialized Value compiler warning in the scoped_timer
|
Fix Uninitialized Value compiler warning in the scoped_timer
Although the code made it impossible to use time_start_ uninitialized, at least GCC did
still produce multiple warnings about it.
Since time_dt() is an extremely cheap operation and functionality does not change in any way when
removing the check in the constructor, this commit removes the check and therefore the warning.
|
C
|
apache-2.0
|
tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird
|
22d68da72421c17ee15e0c7be71740b10a93ee9e
|
testing/platform_test.h
|
testing/platform_test.h
|
// Copyright (c) 2006-2008 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 TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
protected:
PlatformTest();
virtual ~PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
|
// Copyright (c) 2006-2008 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 TESTING_PLATFORM_TEST_H_
#define TESTING_PLATFORM_TEST_H_
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
#ifdef __OBJC__
@class NSAutoreleasePool;
#else
class NSAutoreleasePool;
#endif
// The purpose of this class us to provide a hook for platform-specific
// operations across unit tests. For example, on the Mac, it creates and
// releases an outer NSAutoreleasePool for each test case. For now, it's only
// implemented on the Mac. To enable this for another platform, just adjust
// the #ifdefs and add a platform_test_<platform>.cc implementation file.
class PlatformTest : public testing::Test {
public:
virtual ~PlatformTest();
protected:
PlatformTest();
private:
NSAutoreleasePool* pool_;
};
#else
typedef testing::Test PlatformTest;
#endif // GTEST_OS_MAC
#endif // TESTING_PLATFORM_TEST_H_
|
Change visibility of the destructor to public.
|
Change visibility of the destructor to public.
PlatformTest's destructor was set as protected, though the parent class
testing::Test declares it public.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11038058
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@161352 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,anirudhSK/chromium,anirudhSK/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,Just-D/chromium-1,dednal/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,jaruba/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,ltilve/chromium,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,littlstar/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,patrickm/chromium.src,littlstar/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,ltilve/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,dednal/chromium.src,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,ltilve/chromium,littlstar/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,Jonekee/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hujiajie/pa-chromium,ltilve/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,anirudhSK/chromium,markYoungH/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,anirudhSK/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,dednal/chromium.src,M4sse/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,Chilledheart/chromium,jaruba/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,hujiajie/pa-chromium,jaruba/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Just-D/chromium-1,ltilve/chromium,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,Chilledheart/chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,jaruba/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,hujiajie/pa-chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk
|
5ee6ca95fb823fa0d435af5edbead880362acd1c
|
tests/notest.epiphany.c
|
tests/notest.epiphany.c
|
#include <stdint.h>
#define SKIP 77
struct status {
uint32_t done;
uint32_t _pad1;
uint32_t returncode;
uint32_t _pad2;
} __attribute__((packed));
volatile struct status *epiphany_status = (struct status *) 0x8f200000;
volatile char *epiphany_results = (char *) 0x8f300000;
int main(int argc, char *argv[])
{
epiphany_status->returncode = SKIP;
epiphany_status->done = 1;
return SKIP;
}
|
#include <stdint.h>
#define SKIP 77
struct status {
uint32_t done;
uint32_t _pad1;
uint32_t returncode;
uint32_t _pad2;
} __attribute__((packed));
volatile struct status *epiphany_status = (struct status *) 0x8f200000;
volatile char *epiphany_results = (char *) 0x8f300000;
/* HACK: Provide symbol to work around GCC 5 link error for
* math/check_p_{max,min} */
float *ai;
int main(int argc, char *argv[])
{
epiphany_status->returncode = SKIP;
epiphany_status->done = 1;
return SKIP;
}
|
Fix Epiphany GCC 5 link error
|
tests: Fix Epiphany GCC 5 link error
Signed-off-by: Ola Jeppsson <793f970c52ded1276b9264c742f19d1888cbaf73@adapteva.com>
|
C
|
apache-2.0
|
mateunho/pal,eliteraspberries/pal,parallella/pal,parallella/pal,mateunho/pal,parallella/pal,eliteraspberries/pal,mateunho/pal,mateunho/pal,eliteraspberries/pal,parallella/pal,aolofsson/pal,aolofsson/pal,aolofsson/pal,parallella/pal,mateunho/pal,eliteraspberries/pal,eliteraspberries/pal,aolofsson/pal
|
0dfdfb57d2a2520bfaa7f79343d36478c0929e42
|
test/Analysis/html-diags.c
|
test/Analysis/html-diags.c
|
// RUN: rm -fR %T/dir
// RUN: mkdir %T/dir
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s
// Currently this test mainly checks that the HTML diagnostics doesn't crash
// when handling macros will calls with macros. We should actually validate
// the output, but that requires being able to match against a specifically
// generate HTML file.
#define DEREF(p) *p = 0xDEADBEEF
void has_bug(int *p) {
DEREF(p);
}
#define CALL_HAS_BUG(q) has_bug(q)
void test_call_macro() {
CALL_HAS_BUG(0);
}
|
// RUN: rm -fR %T/dir
// RUN: mkdir %T/dir
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s
// RUN: ls %T/dir | grep report
// PR16547: Test relative paths
// RUN: cd %T/dir
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o testrelative %s
// RUN: ls %T/dir/testrelative | grep report
// REQUIRES: shell
// Currently this test mainly checks that the HTML diagnostics doesn't crash
// when handling macros will calls with macros. We should actually validate
// the output, but that requires being able to match against a specifically
// generate HTML file.
#define DEREF(p) *p = 0xDEADBEEF
void has_bug(int *p) {
DEREF(p);
}
#define CALL_HAS_BUG(q) has_bug(q)
void test_call_macro() {
CALL_HAS_BUG(0);
}
|
Add a test case for r185707/PR16547.
|
Add a test case for r185707/PR16547.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@185708 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
eff847ce8d402b663bf19af3d16da2e3f5cb2bbd
|
libpqxx/include/pqxx/util.h
|
libpqxx/include/pqxx/util.h
|
/*-------------------------------------------------------------------------
*
* FILE
* pqxx/util.h
*
* DESCRIPTION
* Various utility definitions for libpqxx
*
* Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl>
*
* See COPYING for copyright license. If you did not receive a file called
* COPYING with this source code, please notify the distributor of this mistake,
* or contact the author.
*
*-------------------------------------------------------------------------
*/
#ifndef PQXX_UTIL_H
#define PQXX_UTIL_H
#if defined(PQXX_HAVE_CPP_WARNING)
#warning "Deprecated libpqxx header included. Use headers without '.h'"
#elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE)
#pragma message("Deprecated libpqxx header included. Use headers without '.h'")
#endif
#define PQXX_DEPRECATED_HEADERS
#include "pqxx/util"
#endif
|
/*-------------------------------------------------------------------------
*
* FILE
* pqxx/util.h
*
* DESCRIPTION
* Various utility definitions for libpqxx
*
* Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl>
*
* See COPYING for copyright license. If you did not receive a file called
* COPYING with this source code, please notify the distributor of this mistake,
* or contact the author.
*
*-------------------------------------------------------------------------
*/
#ifndef PQXX_UTIL_H
#define PQXX_UTIL_H
#if !defined(PQXXYES_I_KNOW_DEPRECATED_HEADER)
#define PQXXYES_I_KNOW_DEPRECATED_HEADER
#if defined(PQXX_HAVE_CPP_WARNING)
#warning "Deprecated libpqxx header included. Use headers without '.h'"
#elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE)
#pragma message("Deprecated libpqxx header included. Use headers without '.h'")
#endif
#endif
#define PQXX_DEPRECATED_HEADERS
#include "pqxx/util"
#endif
|
Allow suppression of "deprecated header" warning
|
Allow suppression of "deprecated header" warning
|
C
|
bsd-3-clause
|
mpapierski/pqxx,mpapierski/pqxx,mpapierski/pqxx
|
ab49b49f04a3dd9d3a530193798983d540c031d4
|
touch/inc/touch/touch.h
|
touch/inc/touch/touch.h
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright 2013 LibreOffice contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_TOUCH_TOUCH_H
#define INCLUDED_TOUCH_TOUCH_H
#include <config_features.h>
#if !HAVE_FEATURE_DESKTOP
// Functions to be implemented by the upper/medium layers on
// non-desktop touch-based platforms, with the same API on each such
// platform. Note that these are just declared here in this header in
// the "touch" module, the per-platform implementations are elsewhere.
#ifdef __cplusplus
extern "C" {
#endif
void lo_show_keyboard();
void lo_hide_keyboard();
#ifdef __cplusplus
}
#endif
#endif // HAVE_FEATURE_DESKTOP
#endif // INCLUDED_TOUCH_TOUCH_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright 2013 LibreOffice contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_TOUCH_TOUCH_H
#define INCLUDED_TOUCH_TOUCH_H
#include <config_features.h>
#if !HAVE_FEATURE_DESKTOP
// Functions to be implemented by the app-specifc upper or less
// app-specific but platform-specific medium layer on touch-based
// platforms. The same API is used on each such platform. There are
// called from low level LibreOffice code. Note that these are just
// declared here in this header in the "touch" module, the
// per-platform implementations are elsewhere.
#ifdef __cplusplus
extern "C" {
#endif
void lo_show_keyboard();
void lo_hide_keyboard();
// Functions to be implemented in the medium platform-specific layer
// to be called from the app-specific UI layer.
void lo_keyboard_did_hide();
#ifdef __cplusplus
}
#endif
#endif // HAVE_FEATURE_DESKTOP
#endif // INCLUDED_TOUCH_TOUCH_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
Add lo_keyboard_did_hide() and improve comment
|
Add lo_keyboard_did_hide() and improve comment
Change-Id: I20ae40fa03079d69f7ce9e71fa4ef6264e8d84a4
|
C
|
mpl-2.0
|
JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core
|
2838dd973520318e566e50f81843658749f1acb4
|
compat/cbits/unicode.c
|
compat/cbits/unicode.c
|
#if __GLASGOW_HASKELL__ < 604 || (__GLASGOW_HASKELL__==604 && __GHC_PATCHLEVEL__==0)
#include "WCsubst.c"
#endif
|
#if __GLASGOW_HASKELL__ < 605
#if __GLASGOW_HASKELL__ != 604 || __GHC_PATCHLEVEL__ == 0
#include "WCsubst.c"
#endif
#endif
|
Fix building with compilers which don't have an integer for a patch level
|
Fix building with compilers which don't have an integer for a patch level
|
C
|
bsd-3-clause
|
tjakway/ghcjvm,vTurbine/ghc,sgillespie/ghc,nkaretnikov/ghc,snoyberg/ghc,lukexi/ghc-7.8-arm64,gcampax/ghc,sgillespie/ghc,olsner/ghc,ekmett/ghc,mcschroeder/ghc,da-x/ghc,mcschroeder/ghc,lukexi/ghc,sdiehl/ghc,mcschroeder/ghc,ekmett/ghc,vTurbine/ghc,green-haskell/ghc,da-x/ghc,bitemyapp/ghc,elieux/ghc,snoyberg/ghc,christiaanb/ghc,ghc-android/ghc,urbanslug/ghc,nushio3/ghc,ekmett/ghc,holzensp/ghc,gcampax/ghc,oldmanmike/ghc,gridaphobe/ghc,bitemyapp/ghc,green-haskell/ghc,snoyberg/ghc,shlevy/ghc,wxwxwwxxx/ghc,jstolarek/ghc,ezyang/ghc,tibbe/ghc,ezyang/ghc,wxwxwwxxx/ghc,elieux/ghc,AlexanderPankiv/ghc,christiaanb/ghc,nkaretnikov/ghc,ml9951/ghc,vikraman/ghc,sdiehl/ghc,da-x/ghc,olsner/ghc,mfine/ghc,AlexanderPankiv/ghc,spacekitteh/smcghc,lukexi/ghc,siddhanathan/ghc,nomeata/ghc,ryantm/ghc,mcmaniac/ghc,urbanslug/ghc,vTurbine/ghc,bitemyapp/ghc,lukexi/ghc-7.8-arm64,nomeata/ghc,TomMD/ghc,nathyong/microghc-ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,GaloisInc/halvm-ghc,spacekitteh/smcghc,TomMD/ghc,ghc-android/ghc,acowley/ghc,mcschroeder/ghc,fmthoma/ghc,bitemyapp/ghc,mcmaniac/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,GaloisInc/halvm-ghc,urbanslug/ghc,ezyang/ghc,acowley/ghc,forked-upstream-packages-for-ghcjs/ghc,mcschroeder/ghc,gridaphobe/ghc,ml9951/ghc,anton-dessiatov/ghc,nkaretnikov/ghc,lukexi/ghc,olsner/ghc,siddhanathan/ghc,siddhanathan/ghc,mettekou/ghc,ghc-android/ghc,anton-dessiatov/ghc,mfine/ghc,acowley/ghc,hferreiro/replay,ezyang/ghc,ilyasergey/GHC-XAppFix,shlevy/ghc,siddhanathan/ghc,hferreiro/replay,oldmanmike/ghc,mettekou/ghc,shlevy/ghc,oldmanmike/ghc,da-x/ghc,sgillespie/ghc,AlexanderPankiv/ghc,shlevy/ghc,sdiehl/ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,ghc-android/ghc,tjakway/ghcjvm,fmthoma/ghc,mcmaniac/ghc,nkaretnikov/ghc,ezyang/ghc,jstolarek/ghc,ml9951/ghc,TomMD/ghc,ilyasergey/GHC-XAppFix,nomeata/ghc,ilyasergey/GHC-XAppFix,hferreiro/replay,ml9951/ghc,nushio3/ghc,vikraman/ghc,frantisekfarka/ghc-dsi,nomeata/ghc,oldmanmike/ghc,TomMD/ghc,vikraman/ghc,holzensp/ghc,forked-upstream-packages-for-ghcjs/ghc,acowley/ghc,AlexanderPankiv/ghc,nathyong/microghc-ghc,da-x/ghc,olsner/ghc,mfine/ghc,nkaretnikov/ghc,sgillespie/ghc,mcschroeder/ghc,ghc-android/ghc,mcmaniac/ghc,ilyasergey/GHC-XAppFix,tibbe/ghc,GaloisInc/halvm-ghc,lukexi/ghc-7.8-arm64,nkaretnikov/ghc,vTurbine/ghc,ryantm/ghc,nathyong/microghc-ghc,tibbe/ghc,vikraman/ghc,vikraman/ghc,mfine/ghc,shlevy/ghc,ml9951/ghc,wxwxwwxxx/ghc,nushio3/ghc,sgillespie/ghc,ryantm/ghc,ryantm/ghc,holzensp/ghc,acowley/ghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,hferreiro/replay,nathyong/microghc-ghc,forked-upstream-packages-for-ghcjs/ghc,ezyang/ghc,bitemyapp/ghc,sdiehl/ghc,wxwxwwxxx/ghc,lukexi/ghc,olsner/ghc,ml9951/ghc,nkaretnikov/ghc,snoyberg/ghc,gcampax/ghc,gridaphobe/ghc,holzensp/ghc,GaloisInc/halvm-ghc,mcschroeder/ghc,snoyberg/ghc,ekmett/ghc,GaloisInc/halvm-ghc,urbanslug/ghc,christiaanb/ghc,elieux/ghc,fmthoma/ghc,gcampax/ghc,lukexi/ghc-7.8-arm64,oldmanmike/ghc,shlevy/ghc,da-x/ghc,mfine/ghc,shlevy/ghc,green-haskell/ghc,holzensp/ghc,nathyong/microghc-ghc,oldmanmike/ghc,siddhanathan/ghc,mettekou/ghc,olsner/ghc,jstolarek/ghc,hferreiro/replay,hferreiro/replay,vTurbine/ghc,christiaanb/ghc,wxwxwwxxx/ghc,christiaanb/ghc,nushio3/ghc,jstolarek/ghc,ghc-android/ghc,TomMD/ghc,nushio3/ghc,gcampax/ghc,sgillespie/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,gcampax/ghc,tjakway/ghcjvm,hferreiro/replay,mfine/ghc,ekmett/ghc,acowley/ghc,mfine/ghc,snoyberg/ghc,urbanslug/ghc,green-haskell/ghc,sdiehl/ghc,anton-dessiatov/ghc,da-x/ghc,nathyong/microghc-ghc,nushio3/ghc,urbanslug/ghc,anton-dessiatov/ghc,olsner/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,acowley/ghc,elieux/ghc,gcampax/ghc,tjakway/ghcjvm,tibbe/ghc,jstolarek/ghc,siddhanathan/ghc,mettekou/ghc,elieux/ghc,mettekou/ghc,elieux/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,sdiehl/ghc,wxwxwwxxx/ghc,AlexanderPankiv/ghc,fmthoma/ghc,fmthoma/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,christiaanb/ghc,tibbe/ghc,green-haskell/ghc,gridaphobe/ghc,sdiehl/ghc,lukexi/ghc,fmthoma/ghc,forked-upstream-packages-for-ghcjs/ghc,gridaphobe/ghc,vikraman/ghc,nomeata/ghc,oldmanmike/ghc,snoyberg/ghc,tjakway/ghcjvm,ryantm/ghc,ml9951/ghc,vikraman/ghc,spacekitteh/smcghc,elieux/ghc,urbanslug/ghc,ezyang/ghc,nushio3/ghc,spacekitteh/smcghc,TomMD/ghc,wxwxwwxxx/ghc,tjakway/ghcjvm,GaloisInc/halvm-ghc,forked-upstream-packages-for-ghcjs/ghc,forked-upstream-packages-for-ghcjs/ghc,ml9951/ghc,mettekou/ghc,TomMD/ghc,christiaanb/ghc,sgillespie/ghc,mcmaniac/ghc,mettekou/ghc,lukexi/ghc-7.8-arm64,spacekitteh/smcghc,gridaphobe/ghc,frantisekfarka/ghc-dsi,ghc-android/ghc,fmthoma/ghc
|
5e23b0d60f6ad6bea8531375323e3b8e0e5c4f04
|
webserver/src/logging.c
|
webserver/src/logging.c
|
#include <stdlib.h>
#include <stdio.h>
#include "logging.h"
int log_fail(char* msg) {
perror(msg);
// TODO fix log to file
return 0;
}
int log_success(char* msg) {
printf("%s\n", msg);
return 0;
}
|
#include <stdlib.h>
#include <stdio.h>
#include "logging.h"
int log_fail(char* msg) {
perror(msg);
// TODO fix log to file
return 0;
}
int log_success(char* msg) {
printf("SUCCESS: %s\n", msg);
return 0;
}
|
Change of the default msg
|
Change of the default msg
|
C
|
mit
|
foikila/webserver,foikila/webserver
|
fb4c0f835d2377256c599023e91dafc3d8e55b4c
|
src/common/pixelboost/network/networkMessage.h
|
src/common/pixelboost/network/networkMessage.h
|
#pragma once
#define NETWORK_MAX_MESSAGE_LENGTH 65535
#include <sys/types.h>
namespace pb
{
class NetworkMessage
{
public:
NetworkMessage();
NetworkMessage(const NetworkMessage& src);
~NetworkMessage();
bool ReadChar(char& value);
bool ReadByte(__uint8_t& value);
bool ReadInt(__int32_t& value);
bool ReadFloat(float& value);
bool ReadString(const char*& value);
bool WriteChar(char value);
bool WriteByte(__uint8_t value);
bool WriteInt(__int32_t value);
bool WriteFloat(float value);
bool WriteString(const char* value);
bool SetData(__int32_t length, char* data);
void SetProtocol(__uint32_t protocol);
__uint32_t GetProtocol();
int GetDataLength();
int GetMessageLength();
int ConstructMessage(char* buffer, __int32_t maxLength);
private:
bool HasRemaining(__int32_t length);
__uint32_t _Protocol;
char* _Buffer;
int _Offset;
__int32_t _Length;
};
}
|
#pragma once
#define NETWORK_MAX_MESSAGE_LENGTH 262140
#include <sys/types.h>
namespace pb
{
class NetworkMessage
{
public:
NetworkMessage();
NetworkMessage(const NetworkMessage& src);
~NetworkMessage();
bool ReadChar(char& value);
bool ReadByte(__uint8_t& value);
bool ReadInt(__int32_t& value);
bool ReadFloat(float& value);
bool ReadString(const char*& value);
bool WriteChar(char value);
bool WriteByte(__uint8_t value);
bool WriteInt(__int32_t value);
bool WriteFloat(float value);
bool WriteString(const char* value);
bool SetData(__int32_t length, char* data);
void SetProtocol(__uint32_t protocol);
__uint32_t GetProtocol();
int GetDataLength();
int GetMessageLength();
int ConstructMessage(char* buffer, __int32_t maxLength);
private:
bool HasRemaining(__int32_t length);
__uint32_t _Protocol;
char* _Buffer;
int _Offset;
__int32_t _Length;
};
}
|
Increase max length of a network message to support larger records
|
Increase max length of a network message to support larger records
|
C
|
mit
|
pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost,pixelballoon/pixelboost
|
51c7e9a45e870e07de66880248be05d5b73dd249
|
lineart.h
|
lineart.h
|
//
// lineart.h
// LineArt
//
// Created by Allek Mott on 10/1/15.
// Copyright © 2015 Loop404. All rights reserved.
//
#ifndef lineart_h
#define lineart_h
#include <stdio.h>
#define MAX_LINE_LENGTH 200
// data structure for line
// (x1, y1) = inital point
// (x2, y2) = final point
struct line {
int x1;
int y1;
int x2;
int y2;
};
// data structure for point (x, y)
struct point {
int x;
int y;
};
// Generate displacement value for new line
int genDifference();
// Easy line resetting/initialization
void easyLine(struct line *l, int x1, int y1, int x2, int y2);
// Calculates midpoint of line l,
// stores in point p
void getMidpoint(struct line *l, struct point *p);
// Generate next line in sequence
void genNextLine(struct line *previous, struct line *current, int lineNo);
#endif /* lineart_h */
|
//
// lineart.h
// LineArt
//
// Created by Allek Mott on 10/1/15.
// Copyright © 2015 Loop404. All rights reserved.
//
#ifndef lineart_h
#define lineart_h
#include <stdio.h>
#define MAX_LINE_LENGTH 200
// data structure for line
// (x1, y1) = inital point
// (x2, y2) = final point
struct line {
int x1;
int y1;
int x2;
int y2;
};
// data structure for point (x, y)
struct point {
int x;
int y;
};
// data structure for node
// in linked list of lines
struct node {
struct line *line;
struct node *next;
};
// Generate displacement value for new line
int genDifference();
// Easy line resetting/initialization
void easyLine(struct line *l, int x1, int y1, int x2, int y2);
// Calculates midpoint of line l,
// stores in point p
void getMidpoint(struct line *l, struct point *p);
// Generate next line in sequence
void genNextLine(struct line *previous, struct line *current, int lineNo);
void freeLineNode(struct node *node);
void freeLineList(struct node *root);
#endif /* lineart_h */
|
Add list function declarations, node structure
|
Add list function declarations, node structure
|
C
|
apache-2.0
|
tchieze/LineArt
|
1d189e339e73ad78eb02819112a70a5595c9b6b0
|
lib/libskey/skey_getpass.c
|
lib/libskey/skey_getpass.c
|
#include <unistd.h>
#include <stdio.h>
#include <skey.h>
/* skey_getpass - read regular or s/key password */
char *skey_getpass(prompt, pwd, pwok)
char *prompt;
struct passwd *pwd;
int pwok;
{
static char buf[128];
struct skey skey;
char *pass = "";
char *username = pwd ? pwd->pw_name : "nope";
int sflag;
/* Attempt an s/key challenge. */
sflag = skeyinfo(&skey, username, buf);
if (!sflag)
printf("%s\n", buf);
if (!pwok) {
printf("(s/key required)\n");
if (sflag)
return (pass);
}
pass = getpass(prompt);
/* Give S/Key users a chance to do it with echo on. */
if (!sflag && !feof(stdin) && *pass == '\0') {
fputs(" (turning echo on)\n", stdout);
fputs(prompt, stdout);
fflush(stdout);
fgets(buf, sizeof(buf), stdin);
rip(buf);
return (buf);
} else
return (pass);
}
|
#include <unistd.h>
#include <stdio.h>
#include <skey.h>
/* skey_getpass - read regular or s/key password */
char *skey_getpass(prompt, pwd, pwok)
char *prompt;
struct passwd *pwd;
int pwok;
{
static char buf[128];
struct skey skey;
char *pass = "";
char *username = pwd ? pwd->pw_name : ":";
int sflag;
/* Attempt an s/key challenge. */
sflag = skeyinfo(&skey, username, buf);
if (!sflag)
printf("%s\n", buf);
if (!pwok) {
printf("(s/key required)\n");
if (sflag)
return (pass);
}
pass = getpass(prompt);
/* Give S/Key users a chance to do it with echo on. */
if (!sflag && !feof(stdin) && *pass == '\0') {
fputs(" (turning echo on)\n", stdout);
fputs(prompt, stdout);
fflush(stdout);
fgets(buf, sizeof(buf), stdin);
rip(buf);
return (buf);
} else
return (pass);
}
|
Change "nope" to ":" Previous variant not work well, if you have a user with name nope
|
Change "nope" to ":"
Previous variant not work well, if you have a user with name nope
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
8f609567b666a160d19537f5b0e793b6092eb499
|
ir/ana/constbits.h
|
ir/ana/constbits.h
|
#ifndef CONSTBITS_H
#define CONSTBITS_H
#include "adt/obst.h"
#include "tv.h"
typedef struct bitinfo
{
ir_tarval* z; /* safe zeroes, 0 = bit is zero, 1 = bit maybe is 1 */
ir_tarval* o; /* safe ones, 0 = bit maybe is zero, 1 = bit is 1 */
} bitinfo;
/* Get analysis information for node irn */
bitinfo* get_bitinfo(ir_node const* const irn);
/* Set analysis information for node irn */
int set_bitinfo(ir_node* const irn, ir_tarval* const z, ir_tarval* const o);
/* Compute value range fixpoint aka which bits of value are constant zero/one.
* The result is available via links to bitinfo*, allocated on client_obst. */
void constbits_analyze(ir_graph* const irg, struct obstack *client_obst);
/* Clears the bit information for the given graph.
*
* This does not affect the obstack passed to constbits_analyze.
*/
void constbits_clear(ir_graph* const irg);
#endif
|
#ifndef CONSTBITS_H
#define CONSTBITS_H
#include "adt/obst.h"
#include "tv.h"
typedef struct bitinfo
{
ir_tarval* z; /* safe zeroes, 0 = bit is zero, 1 = bit maybe is 1 */
ir_tarval* o; /* safe ones, 0 = bit maybe is zero, 1 = bit is 1 */
} bitinfo;
/* Get analysis information for node irn */
bitinfo* get_bitinfo(ir_node const* irn);
/* Set analysis information for node irn */
int set_bitinfo(ir_node* irn, ir_tarval* z, ir_tarval* o);
/* Compute value range fixpoint aka which bits of value are constant zero/one.
* The result is available via links to bitinfo*, allocated on client_obst. */
void constbits_analyze(ir_graph* irg, struct obstack *client_obst);
/* Clears the bit information for the given graph.
*
* This does not affect the obstack passed to constbits_analyze.
*/
void constbits_clear(ir_graph* irg);
#endif
|
Remove pointless const from function declarations.
|
Remove pointless const from function declarations.
|
C
|
lgpl-2.1
|
jonashaag/libfirm,8l/libfirm,libfirm/libfirm,killbug2004/libfirm,davidgiven/libfirm,MatzeB/libfirm,jonashaag/libfirm,libfirm/libfirm,killbug2004/libfirm,MatzeB/libfirm,8l/libfirm,jonashaag/libfirm,killbug2004/libfirm,MatzeB/libfirm,jonashaag/libfirm,davidgiven/libfirm,libfirm/libfirm,davidgiven/libfirm,killbug2004/libfirm,libfirm/libfirm,killbug2004/libfirm,8l/libfirm,davidgiven/libfirm,jonashaag/libfirm,MatzeB/libfirm,8l/libfirm,killbug2004/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,davidgiven/libfirm,jonashaag/libfirm,8l/libfirm,8l/libfirm,killbug2004/libfirm,8l/libfirm,davidgiven/libfirm,MatzeB/libfirm,davidgiven/libfirm
|
087d26add507d41839b5ae9c80f25e7208c82754
|
third_party/widevine/cdm/android/widevine_cdm_version.h
|
third_party/widevine/cdm/android/widevine_cdm_version.h
|
// Copyright (c) 2013 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 WIDEVINE_CDM_VERSION_H_
#define WIDEVINE_CDM_VERSION_H_
#include "third_party/widevine/cdm/widevine_cdm_common.h"
// Indicates that the Widevine CDM is available.
#define WIDEVINE_CDM_AVAILABLE
// TODO(ddorwin): Remove when we have CDM availability detection
// (http://crbug.com/224793).
#define DISABLE_WIDEVINE_CDM_CANPLAYTYPE
// Indicates that ISO BMFF CENC support is available in the Widevine CDM.
// Must be enabled if any of the codecs below are enabled.
#define WIDEVINE_CDM_CENC_SUPPORT_AVAILABLE
// Indicates that AVC1 decoding is available for ISO BMFF CENC.
#define WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE
// Indicates that AAC decoding is available for ISO BMFF CENC.
#define WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE
#endif // WIDEVINE_CDM_VERSION_H_
|
// Copyright (c) 2013 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 WIDEVINE_CDM_VERSION_H_
#define WIDEVINE_CDM_VERSION_H_
#include "third_party/widevine/cdm/widevine_cdm_common.h"
// Indicates that the Widevine CDM is available.
#define WIDEVINE_CDM_AVAILABLE
// Indicates that AVC1 decoding is available for ISO BMFF CENC.
#define WIDEVINE_CDM_AVC1_SUPPORT_AVAILABLE
// Indicates that AAC decoding is available for ISO BMFF CENC.
#define WIDEVINE_CDM_AAC_SUPPORT_AVAILABLE
#endif // WIDEVINE_CDM_VERSION_H_
|
Remove DISABLE_WIDEVINE_CDM_CANPLAYTYPE as we should start using canPlayType now
|
Remove DISABLE_WIDEVINE_CDM_CANPLAYTYPE as we should start using canPlayType now
Passed the canplaytype check when tested with http://dash-mse-test.appspot.com/append-all.html?sd=1&keysystem=widevine
BUG=224793
Review URL: https://chromiumcodereview.appspot.com/24072009
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@224312 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
anirudhSK/chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,anirudhSK/chromium,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Chilledheart/chromium,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,littlstar/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,littlstar/chromium.src,patrickm/chromium.src,ltilve/chromium,anirudhSK/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,jaruba/chromium.src,markYoungH/chromium.src,anirudhSK/chromium,dednal/chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,Just-D/chromium-1,Just-D/chromium-1,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,ltilve/chromium,jaruba/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,patrickm/chromium.src,Just-D/chromium-1,patrickm/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,dednal/chromium.src,ltilve/chromium,ondra-novak/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,Chilledheart/chromium,ondra-novak/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,markYoungH/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,M4sse/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,Fireblend/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,anirudhSK/chromium,anirudhSK/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk
|
8112c82609b3307c193ffefae01690ecd6e99968
|
BlocksKit/NSCache+BlocksKit.h
|
BlocksKit/NSCache+BlocksKit.h
|
//
// NSCache+BlocksKit.h
// %PROJECT
//
#import "BKGlobals.h"
/** NSCache with block adding of objects
This category allows you to conditionally add objects to
an instance of NSCache using blocks. Both the normal
delegation pattern and a block callback for NSCache's one
delegate method are allowed.
These methods emulate Rails caching behavior.
Created by Igor Evsukov and contributed to BlocksKit.
*/
@interface NSCache (BlocksKit)
/** Returns the value associated with a given key. If there is no
object for that key, it uses the result of the block, saves
that to the cache, and returns it.
This mimics the cache behavior of Ruby on Rails. The following code:
@products = Rails.cache.fetch('products') do
Product.all
end
becomes:
NSMutableArray *products = [cache objectForKey:@"products" withGetter:^id{
return [Product all];
}];
@return The value associated with *key*, or the object returned
by the block if no value is associated with *key*.
@param key An object identifying the value.
@param getterBlock A block used to get an object if there is no
value in the cache.
*/
- (id)objectForKey:(id)key withGetter:(BKReturnBlock)getterBlock;
/** Called when an object is about to be evicted from the cache.
This block callback is an analog for the cache:willEviceObject:
method of NSCacheDelegate.
*/
@property (copy) BKSenderBlock willEvictBlock;
@end
|
//
// NSCache+BlocksKit.h
// %PROJECT
//
#import "BKGlobals.h"
/** NSCache with block adding of objects
This category allows you to conditionally add objects to
an instance of NSCache using blocks. Both the normal
delegation pattern and a block callback for NSCache's one
delegate method are allowed.
These methods emulate Rails caching behavior.
Created by Igor Evsukov and contributed to BlocksKit.
*/
@interface NSCache (BlocksKit)
/** Returns the value associated with a given key. If there is no
object for that key, it uses the result of the block, saves
that to the cache, and returns it.
This mimics the cache behavior of Ruby on Rails. The following code:
@products = Rails.cache.fetch('products') do
Product.all
end
becomes:
NSMutableArray *products = [cache objectForKey:@"products" withGetter:^id{
return [Product all];
}];
@return The value associated with *key*, or the object returned
by the block if no value is associated with *key*.
@param key An object identifying the value.
@param getterBlock A block used to get an object if there is no
value in the cache.
*/
- (id)objectForKey:(id)key withGetter:(BKReturnBlock)getterBlock;
/** Called when an object is about to be evicted from the cache.
This block callback is an analog for the cache:willEviceObject:
method of NSCacheDelegate.
*/
@property (copy) void(^willEvictBlock)(NSCache *, id);
@end
|
Fix block property type in NSCache.
|
Fix block property type in NSCache.
|
C
|
mit
|
AlexanderMazaletskiy/BlocksKit,zxq3220122/BlocksKit-1,HarrisLee/BlocksKit,zwaldowski/BlocksKit,yimouleng/BlocksKit,z8927623/BlocksKit,Herbert77/BlocksKit,tattocau/BlocksKit,pilot34/BlocksKit,hq804116393/BlocksKit,stevenxiaoyang/BlocksKit,Gitub/BlocksKit,dachaoisme/BlocksKit,demonnico/BlocksKit,pomu0325/BlocksKit,anton-matosov/BlocksKit,ManagerOrganization/BlocksKit,yaoxiaoyong/BlocksKit,shenhzou654321/BlocksKit,owers19856/BlocksKit,hartbit/BlocksKit,Voxer/BlocksKit,xinlehou/BlocksKit,aipeople/BlocksKit,zhaoguohui/BlocksKit,TomBin647/BlocksKit,coneman/BlocksKit
|
18fdd4612a7cb7449048e234af3ce24644ca9f46
|
include/queuemanager.h
|
include/queuemanager.h
|
#ifndef NEWSBOAT_QUEUEMANAGER_H_
#define NEWSBOAT_QUEUEMANAGER_H_
#include <memory>
#include <string>
namespace newsboat {
class ConfigContainer;
class ConfigPaths;
class RssFeed;
class QueueManager {
ConfigContainer* cfg = nullptr;
ConfigPaths* paths = nullptr;
public:
QueueManager(ConfigContainer* cfg, ConfigPaths* paths);
void enqueue_url(const std::string& url,
const std::string& title,
const time_t pubDate,
std::shared_ptr<RssFeed> feed);
void autoenqueue(std::shared_ptr<RssFeed> feed);
private:
std::string generate_enqueue_filename(const std::string& url,
const std::string& title,
const time_t pubDate,
std::shared_ptr<RssFeed> feed);
};
}
#endif /* NEWSBOAT_QUEUEMANAGER_H_ */
|
#ifndef NEWSBOAT_QUEUEMANAGER_H_
#define NEWSBOAT_QUEUEMANAGER_H_
#include <ctime>
#include <memory>
#include <string>
namespace newsboat {
class ConfigContainer;
class ConfigPaths;
class RssFeed;
class QueueManager {
ConfigContainer* cfg = nullptr;
ConfigPaths* paths = nullptr;
public:
QueueManager(ConfigContainer* cfg, ConfigPaths* paths);
void enqueue_url(const std::string& url,
const std::string& title,
const time_t pubDate,
std::shared_ptr<RssFeed> feed);
void autoenqueue(std::shared_ptr<RssFeed> feed);
private:
std::string generate_enqueue_filename(const std::string& url,
const std::string& title,
const time_t pubDate,
std::shared_ptr<RssFeed> feed);
};
}
#endif /* NEWSBOAT_QUEUEMANAGER_H_ */
|
Add missing header and fix build on FreeBSD
|
Add missing header and fix build on FreeBSD
In file included from src/queuemanager.cpp:1:
include/queuemanager.h:22:9: error: unknown type name 'time_t'
const time_t pubDate,
^
Signed-off-by: Tobias Kortkamp <95411b5f3468a822bfbad7edd660475780680510@FreeBSD.org>
|
C
|
mit
|
der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat,der-lyse/newsboat
|
4f897d18736c57e3a404252bd61258d6290d184a
|
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 72
#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 73
#endif
|
Update Skia milestone to 73
|
Update Skia milestone to 73
Bug: skia:
Change-Id: I4b8744f1f9d752a54429054d7539c46e24fcba82
Reviewed-on: https://skia-review.googlesource.com/c/173428
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
google/skia,aosp-mirror/platform_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,HalCanary/skia-hc,google/skia,google/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc
|
de4201ea6e5d1f02ca09a11892ac24b32607d9a6
|
sw/tests/rv_timer/rv_timer_test.c
|
sw/tests/rv_timer/rv_timer_test.c
|
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "irq.h"
#include "rv_timer.h"
#include "uart.h"
static uint32_t intr_handling_success = 0;
static const uint32_t hart = 0;
int main(int argc, char **argv) {
uint64_t cmp = 0x00000000000000FF;
uart_init(UART_BAUD_RATE);
irq_global_ctrl(true);
irq_timer_ctrl(true);
rv_timer_set_us_tick(hart);
rv_timer_set_cmp(hart, cmp);
rv_timer_ctrl(hart, true);
rv_timer_intr_enable(hart, true);
while (1) {
if (intr_handling_success) {
break;
}
}
uart_send_str("PASS!\r\n");
__asm__ volatile("wfi;");
}
// Override weak default function
void handler_irq_timer(void) {
rv_timer_ctrl(hart, false);
rv_timer_clr_all_intrs();
intr_handling_success = 1;
}
|
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "irq.h"
#include "rv_timer.h"
#include "uart.h"
static uint32_t intr_handling_success = 0;
static const uint32_t hart = 0;
int main(int argc, char **argv) {
const uint64_t cmp = 0x000000000000000F;
uart_init(UART_BAUD_RATE);
irq_global_ctrl(true);
irq_timer_ctrl(true);
rv_timer_set_us_tick(hart);
rv_timer_set_cmp(hart, cmp);
rv_timer_ctrl(hart, true);
rv_timer_intr_enable(hart, true);
while (1) {
if (intr_handling_success) {
break;
}
}
uart_send_str("PASS!\r\n");
__asm__ volatile("wfi;");
}
// Override weak default function
void handler_irq_timer(void) {
uart_send_str("In Interrupt handler!\r\n");
rv_timer_ctrl(hart, false);
rv_timer_clr_all_intrs();
intr_handling_success = 1;
}
|
Decrease compare value for faster testing
|
[test] Decrease compare value for faster testing
|
C
|
apache-2.0
|
lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan
|
f7df91a61b63f1b306f73a5166bec47b04add65b
|
src/lib_atlas/macros.h
|
src/lib_atlas/macros.h
|
/**
* \file macros.h
* \author Thibaut Mattio <thibaut.mattio@gmail.com>
* \date 28/06/2015
* \copyright Copyright (c) 2015 Thibaut Mattio. All rights reserved.
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
#ifndef ATLAS_MACROS_H_
#define ATLAS_MACROS_H_
#if (__cplusplus >= 201103L)
#define ATLAS_NOEXCEPT noexcept
#define ATLAS_NOEXCEPT_(x) noexcept(x)
#define ATLAS_NOEXCEPT_OR_FALSE(x) noexcept(x)
#else
#define ATLAS_NOEXCEPT throw()
#define ATLAS_NOEXCEPT_(x)
#define ATLAS_NOEXCEPT_OR_FALSE(x) false
#endif
#ifndef ATLAS_ALWAYS_INLINE
#define ATLAS_ALWAYS_INLINE \
__attribute__((__visibility__("default"), __always_inline__)) inline
#endif
#endif // ATLAS_MACROS_H_
|
/**
* \file macros.h
* \author Thibaut Mattio <thibaut.mattio@gmail.com>
* \date 28/06/2015
* \copyright Copyright (c) 2015 Thibaut Mattio. All rights reserved.
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
#ifndef ATLAS_MACROS_H_
#define ATLAS_MACROS_H_
// Defining exception macros
#if (__cplusplus >= 201103L)
#define ATLAS_NOEXCEPT noexcept
#define ATLAS_NOEXCEPT_(x) noexcept(x)
#define ATLAS_NOEXCEPT_OR_FALSE(x) noexcept(x)
#else
#define ATLAS_NOEXCEPT throw()
#define ATLAS_NOEXCEPT_(x)
#define ATLAS_NOEXCEPT_OR_FALSE(x) false
#endif
// Defining inline macros
#ifndef ATLAS_ALWAYS_INLINE
#define ATLAS_ALWAYS_INLINE \
__attribute__((__visibility__("default"), __always_inline__)) inline
#endif
// Defining OS variables
#if defined(_WIN32)
# define OS_WINDOWS 1
#elif defined(__APPLE__)
# define OS_DARWIN 1
#elif defined(__linux__)
# define OS_LINUX 1
#endif
#endif // ATLAS_MACROS_H_
|
Make ins provider compile on darwin os.
|
Make ins provider compile on darwin os.
|
C
|
mit
|
sonia-auv/atlas,sonia-auv/atlas
|
c77b5fa13212089262ca9c25d65551264a32cd1e
|
capnp/helpers/checkCompiler.h
|
capnp/helpers/checkCompiler.h
|
#ifdef __GNUC__
#if __clang__
#if __cplusplus >= 201103L && !__has_include(<initializer_list>)
#warning "Your compiler supports C++11 but your C++ standard library does not. If your system has libc++ installed (as should be the case on e.g. Mac OSX), try adding -stdlib=libc++ to your CFLAGS (ignore the other warning that says to use CXXFLAGS)."
#endif
#endif
#endif
#include "capnp/dynamic.h"
static_assert(CAPNP_VERSION >= 5000, "Version of Cap'n Proto C++ Library is too old. Please upgrade to a version >= 0.4 and then re-install this python library");
|
#ifdef __GNUC__
#if __clang__
#if __cplusplus >= 201103L && !__has_include(<initializer_list>)
#warning "Your compiler supports C++11 but your C++ standard library does not. If your system has libc++ installed (as should be the case on e.g. Mac OSX), try adding -stdlib=libc++ to your CFLAGS (ignore the other warning that says to use CXXFLAGS)."
#endif
#endif
#endif
#include "capnp/dynamic.h"
static_assert(CAPNP_VERSION >= 5000, "Version of Cap'n Proto C++ Library is too old. Please upgrade to a version >= 0.5 and then re-install this python library");
|
Fix error message in version check
|
Fix error message in version check
|
C
|
bsd-2-clause
|
rcrowder/pycapnp,tempbottle/pycapnp,tempbottle/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,rcrowder/pycapnp,tempbottle/pycapnp,jparyani/pycapnp,SymbiFlow/pycapnp,rcrowder/pycapnp,rcrowder/pycapnp,SymbiFlow/pycapnp,SymbiFlow/pycapnp,jparyani/pycapnp,tempbottle/pycapnp,jparyani/pycapnp
|
cade60aa064e9f6ca308806b6071ffae8dbab954
|
bin/lsip.c
|
bin/lsip.c
|
#include <stdio.h>
#include <stdlib.h>
#include <curl/curl.h>
int main (int argc, char ** argv)
{ CURL * handle;
CURLcode res;
curl_global_init(CURL_GLOBAL_ALL);
handle = curl_easy_init();
if ( handle )
{ curl_easy_setopt(handle, CURLOPT_URL, "http://icanhazip.com");
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
res = curl_easy_perform(handle);
if ( ! res == CURLE_OK )
{ curl_easy_cleanup(handle);
curl_global_cleanup();
fputs("Could not check IP address\n", stderr);
exit(1);
}
}
curl_easy_cleanup(handle);
curl_global_cleanup();
return 0;
}
// vim: set tabstop=4 shiftwidth=4 expandtab
|
#include <stdio.h>
#include <stdlib.h>
#include <curl/curl.h>
int main ()
{ CURL * handle;
CURLcode res;
curl_global_init(CURL_GLOBAL_ALL);
handle = curl_easy_init();
if ( handle )
{ curl_easy_setopt(handle, CURLOPT_URL, "http://icanhazip.com");
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
res = curl_easy_perform(handle);
if ( ! res == CURLE_OK )
{ curl_easy_cleanup(handle);
curl_global_cleanup();
fputs("Could not check IP address\n", stderr);
exit(1);
}
}
curl_easy_cleanup(handle);
curl_global_cleanup();
return 0;
}
// vim: set tabstop=4 shiftwidth=4 expandtab
|
Remove arg{c,v} params for main() since they are unneeded
|
Remove arg{c,v} params for main() since they are unneeded
|
C
|
unlicense
|
HalosGhost/.dotfiles,HalosGhost/.dotfiles
|
669b5c11d8c82252f9697e35d183a0c840386261
|
libmultipath/alias.h
|
libmultipath/alias.h
|
#define BINDINGS_FILE_TIMEOUT 3
#define BINDINGS_FILE_HEADER \
"# Multipath bindings, Version : 1.0\n" \
"# NOTE: this file is automatically maintained by the multipath program.\n" \
"# You should not need to edit this file in normal circumstances.\n" \
"#\n" \
"# Format:\n" \
"# alias wwid\n" \
"#\n"
char *get_user_friendly_alias(char *wwid, char *file);
char *get_user_friendly_wwid(char *alias, char *file);
|
#define BINDINGS_FILE_TIMEOUT 30
#define BINDINGS_FILE_HEADER \
"# Multipath bindings, Version : 1.0\n" \
"# NOTE: this file is automatically maintained by the multipath program.\n" \
"# You should not need to edit this file in normal circumstances.\n" \
"#\n" \
"# Format:\n" \
"# alias wwid\n" \
"#\n"
char *get_user_friendly_alias(char *wwid, char *file);
char *get_user_friendly_wwid(char *alias, char *file);
|
Increase bindings file lock timeout to avoid failure of user_friendly_names
|
[lib] Increase bindings file lock timeout to avoid failure of user_friendly_names
On setups with a large number of paths / multipath maps, contention for
the advisory lock on the bindings file may take longer than 3 seconds,
and some multipath processes may create maps based on WWID despite having
user_friendly_names set. Increasing the timeout is a simple fix that
gets us a bit further.
|
C
|
lgpl-2.1
|
unakatsuo/multipath-tools,vijaychauhan/multipath-tools,grzn/multipath-tools-explained,unakatsuo/multipath-tools,grzn/multipath-tools-explained,gebi/multipath-tools,unakatsuo/multipath-tools,vijaychauhan/multipath-tools
|
2e890d726c631346512b74928411575dcaa517d9
|
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 99
#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 100
#endif
|
Update Skia milestone to 100
|
Update Skia milestone to 100
Change-Id: I9d435a7a68ef870ef027ee3c6acb79792773868b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/497609
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Auto-Submit: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Commit-Queue: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
|
C
|
bsd-3-clause
|
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,google/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,google/skia,google/skia,aosp-mirror/platform_external_skia
|
1636cf91cd66ab4cae55854b25f45b1b77151c88
|
src/idx.h
|
src/idx.h
|
#ifndef __IDX_H_ENTRY_H__
#define __IDX_H_ENTRY_H__
typedef struct {
unsigned char header[4];
int length;
unsigned char *data;
} IDX1_DATA ;
typedef struct {
unsigned char header[4];
int nimages;
int nrows;
int ncols;
unsigned char *data;
} IDX3_DATA ;
int fread_idx1_file( char *slabelfname, IDX1_DATA *idxdata);
#endif /* __IDX_H_ENTRY_H__ */
|
#ifndef __IDX_H_ENTRY_H__
#define __IDX_H_ENTRY_H__
typedef struct {
unsigned char header[4];
int length;
unsigned char *data;
} IDX1_DATA ;
typedef struct {
unsigned char header[4];
int nimages;
int nrows;
int ncols;
int length;
unsigned char *data;
} IDX3_DATA ;
int fread_idx1_file( char *slabelfname, IDX1_DATA *idxdata);
#endif /* __IDX_H_ENTRY_H__ */
|
Add a length field to the IDX3_DATA structure.
|
Add a length field to the IDX3_DATA structure.
|
C
|
mit
|
spytheman/MNIST-idx1-and-idx3-file-readers
|
f12a377ceee0f8ee2d5fc5dd83be6015197b5387
|
nvidia_library/NvidiaApi.h
|
nvidia_library/NvidiaApi.h
|
#pragma once
#include "helpers.h"
#include "nvidia_interface_datatypes.h"
#include <vector>
#include <memory>
class NvidiaGPU;
class NVLIB_EXPORTED NvidiaApi
{
public:
NvidiaApi();
~NvidiaApi();
int getGPUCount();
std::shared_ptr<NvidiaGPU> getGPU(int index);
private:
bool GPUloaded = false;
std::vector<std::shared_ptr<NvidiaGPU>> gpus;
bool ensureGPUsLoaded();
};
class NVLIB_EXPORTED NvidiaGPU
{
public:
friend class NvidiaApi;
float getCoreClock();
float getMemoryClock();
float getGPUUsage();
float getFBUsage();
float getVidUsage();
float getBusUsage();
private:
NV_PHYSICAL_GPU_HANDLE handle;
NvidiaGPU(NV_PHYSICAL_GPU_HANDLE handle);
struct NVIDIA_CLOCK_FREQUENCIES frequencies;
bool reloadFrequencies();
float getClockForSystem(NVIDIA_CLOCK_SYSTEM system);
float getUsageForSystem(NVIDIA_DYNAMIC_PSTATES_SYSTEM system);
};
|
#pragma once
#include "helpers.h"
#include "nvidia_interface_datatypes.h"
#include <vector>
#include <memory>
class NvidiaGPU;
class NVLIB_EXPORTED NvidiaApi
{
public:
NvidiaApi();
~NvidiaApi();
int getGPUCount();
std::shared_ptr<NvidiaGPU> getGPU(int index);
private:
std::vector<std::shared_ptr<NvidiaGPU>> gpus;
bool ensureGPUsLoaded();
bool GPUloaded = false;
};
class NVLIB_EXPORTED NvidiaGPU
{
public:
friend class NvidiaApi;
float getCoreClock();
float getMemoryClock();
float getGPUUsage();
float getFBUsage();
float getVidUsage();
float getBusUsage();
private:
NV_PHYSICAL_GPU_HANDLE handle;
NvidiaGPU(NV_PHYSICAL_GPU_HANDLE handle);
struct NVIDIA_CLOCK_FREQUENCIES frequencies;
bool reloadFrequencies();
float getClockForSystem(NVIDIA_CLOCK_SYSTEM system);
float getUsageForSystem(NVIDIA_DYNAMIC_PSTATES_SYSTEM system);
};
|
Tweak a minor alignment issue.
|
Tweak a minor alignment issue.
|
C
|
mit
|
ircubic/lib_gpu,ircubic/lib_gpu,ircubic/lib_gpu
|
b16eec4314bc8716ac56b8db04d1d49eaf9f8148
|
include/flatcc/portable/pversion.h
|
include/flatcc/portable/pversion.h
|
#define PORTABLE_VERSION_TEXT "0.2.5"
#define PORTABLE_VERSION_MAJOR 0
#define PORTABLE_VERSION_MINOR 2
#define PORTABLE_VERSION_PATCH 5
/* 1 or 0 */
#define PORTABLE_VERSION_RELEASED 1
|
#define PORTABLE_VERSION_TEXT "0.2.6-pre"
#define PORTABLE_VERSION_MAJOR 0
#define PORTABLE_VERSION_MINOR 2
#define PORTABLE_VERSION_PATCH 6
/* 1 or 0 */
#define PORTABLE_VERSION_RELEASED 0
|
Bump portable version to 0.2.6-pre
|
Bump portable version to 0.2.6-pre
|
C
|
apache-2.0
|
dvidelabs/flatcc,dvidelabs/flatcc,dvidelabs/flatcc
|
262de226f343c443c29c2e83328a8be07afbc3cc
|
include/flatcc/portable/pversion.h
|
include/flatcc/portable/pversion.h
|
#define PORTABLE_VERSION_TEXT "0.2.4"
#define PORTABLE_VERSION_MAJOR 0
#define PORTABLE_VERSION_MINOR 2
#define PORTABLE_VERSION_PATCH 4
/* 1 or 0 */
#define PORTABLE_VERSION_RELEASED 1
|
#define PORTABLE_VERSION_TEXT "0.2.5-pre"
#define PORTABLE_VERSION_MAJOR 0
#define PORTABLE_VERSION_MINOR 2
#define PORTABLE_VERSION_PATCH 5
/* 1 or 0 */
#define PORTABLE_VERSION_RELEASED 0
|
Update portable version to unreleased
|
Update portable version to unreleased
|
C
|
apache-2.0
|
dvidelabs/flatcc,dvidelabs/flatcc,dvidelabs/flatcc
|
459c21926c5bbefe8689a4b4fd6088d0e6ed05f1
|
main.c
|
main.c
|
#include <stdio.h>
#include <stdlib.h>
#include <termbox.h>
#include "editor.h"
#include "util.h"
int main(int argc, char *argv[]) {
debug_init();
editor_t editor;
cursor_t cursor;
editor_init(&editor, &cursor, argc > 1 ? argv[1] : NULL);
int err = tb_init();
if (err) {
fprintf(stderr, "tb_init() failed with error code %d\n", err);
return 1;
}
atexit(tb_shutdown);
editor_draw(&editor);
struct tb_event ev;
while (tb_poll_event(&ev)) {
switch (ev.type) {
case TB_EVENT_KEY:
editor_handle_key_press(&editor, &ev);
break;
case TB_EVENT_RESIZE:
editor_draw(&editor);
break;
default:
break;
}
}
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <termbox.h>
#include "editor.h"
#include "util.h"
// termbox catches ctrl-z as a regular key event. To suspend the process as
// normal, manually raise SIGTSTP.
//
// Not 100% sure why we need to shutdown termbox, but the terminal gets all
// weird if we don't. Mainly copied this approach from here:
// https://github.com/nsf/godit/blob/master/suspend_linux.go
static void suspend(editor_t *editor) {
tb_shutdown();
raise(SIGTSTP);
int err = tb_init();
if (err) {
fprintf(stderr, "tb_init() failed with error code %d\n", err);
exit(1);
}
editor_draw(editor);
}
int main(int argc, char *argv[]) {
debug_init();
editor_t editor;
cursor_t cursor;
editor_init(&editor, &cursor, argc > 1 ? argv[1] : NULL);
int err = tb_init();
if (err) {
fprintf(stderr, "tb_init() failed with error code %d\n", err);
return 1;
}
atexit(tb_shutdown);
editor_draw(&editor);
struct tb_event ev;
while (tb_poll_event(&ev)) {
switch (ev.type) {
case TB_EVENT_KEY:
if (ev.key == TB_KEY_CTRL_Z) {
suspend(&editor);
} else {
editor_handle_key_press(&editor, &ev);
}
break;
case TB_EVENT_RESIZE:
editor_draw(&editor);
break;
default:
break;
}
}
return 0;
}
|
Handle Ctrl-Z to suspend the process.
|
Handle Ctrl-Z to suspend the process.
|
C
|
mit
|
isbadawi/badavi
|
beed7117adc92edf3e5aefb1d341e29eab90b17d
|
libraries/mbed/common/exit.c
|
libraries/mbed/common/exit.c
|
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
*
* 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 "semihost_api.h"
#include "mbed_interface.h"
#ifdef TOOLCHAIN_GCC_CW
// TODO: Ideally, we would like to define directly "_ExitProcess"
void mbed_exit(int return_code) {
#else
void exit(int return_code) {
#endif
#if DEVICE_SEMIHOST
if (mbed_interface_connected()) {
semihost_exit();
}
#endif
if (return_code) {
mbed_die();
}
while (1);
}
|
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
*
* 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 "semihost_api.h"
#include "mbed_interface.h"
#include "toolchain.h"
#ifdef TOOLCHAIN_GCC_CW
// TODO: Ideally, we would like to define directly "_ExitProcess"
void mbed_exit(int return_code) {
#else
void exit(int return_code) {
#endif
#if DEVICE_SEMIHOST
if (mbed_interface_connected()) {
semihost_exit();
}
#endif
if (return_code) {
mbed_die();
}
while (1);
}
WEAK void __cxa_pure_virtual(void);
WEAK void __cxa_pure_virtual(void) {
exit(1);
}
|
Add __cxa_pure_virtual to avoid pulling in functions from the C++ library
|
Add __cxa_pure_virtual to avoid pulling in functions from the C++ library
Fixes PRMBED-859
|
C
|
apache-2.0
|
nabilbendafi/mbed,pradeep-gr/mbed-os5-onsemi,sam-geek/mbed,DanKupiniak/mbed,jrjang/mbed,alertby/mbed,svogl/mbed-os,nvlsianpu/mbed,mbedmicro/mbed,logost/mbed,hwfwgrp/mbed,mbedmicro/mbed,svastm/mbed,Sweet-Peas/mbed,radhika-raghavendran/mbed-os5.1-onsemi,pi19404/mbed,alertby/mbed,alertby/mbed,autopulated/mbed,devanlai/mbed,ARM-software/mbed-beetle,GustavWi/mbed,pedromes/mbed,jferreir/mbed,wodji/mbed,fanghuaqi/mbed,tung7970/mbed-os,RonEld/mbed,svogl/mbed-os,devanlai/mbed,YarivCol/mbed-os,kl-cruz/mbed-os,ban4jp/mbed,NitinBhaskar/mbed,screamerbg/mbed,fpiot/mbed-ats,RonEld/mbed,K4zuki/mbed,larks/mbed,jferreir/mbed,FranklyDev/mbed,andreaslarssonublox/mbed,HeadsUpDisplayInc/mbed,mmorenobarm/mbed-os,wodji/mbed,NitinBhaskar/mbed,fahhem/mbed-os,Willem23/mbed,0xc0170/mbed-drivers,svastm/mbed,geky/mbed,bikeNomad/mbed,andreaslarssonublox/mbed,CalSol/mbed,jeremybrodt/mbed,sam-geek/mbed,CalSol/mbed,xcrespo/mbed,Timmmm/mbed,mmorenobarm/mbed-os,JasonHow44/mbed,mikaleppanen/mbed-os,theotherjimmy/mbed,tung7970/mbed-os-1,Sweet-Peas/mbed,svogl/mbed-os,bentwire/mbed,fvincenzo/mbed-os,hwfwgrp/mbed,kl-cruz/mbed-os,JasonHow44/mbed,mikaleppanen/mbed-os,maximmbed/mbed,nabilbendafi/mbed,HeadsUpDisplayInc/mbed,masaohamanaka/mbed,Willem23/mbed,devanlai/mbed,jeremybrodt/mbed,karsev/mbed-os,screamerbg/mbed,sam-geek/mbed,fanghuaqi/mbed,brstew/MBED-BUILD,cvtsi2sd/mbed-os,pi19404/mbed,Tiryoh/mbed,NXPmicro/mbed,kjbracey-arm/mbed,NitinBhaskar/mbed,infinnovation/mbed-os,sg-/mbed-drivers,cvtsi2sd/mbed-os,pedromes/mbed,NXPmicro/mbed,Archcady/mbed-os,xcrespo/mbed,mmorenobarm/mbed-os,bremoran/mbed-drivers,NXPmicro/mbed,JasonHow44/mbed,Marcomissyou/mbed,GustavWi/mbed,adamgreen/mbed,catiedev/mbed-os,screamerbg/mbed,hwfwgrp/mbed,struempelix/mbed,adustm/mbed,netzimme/mbed-os,autopulated/mbed,Shengliang/mbed,wodji/mbed,brstew/MBED-BUILD,FranklyDev/mbed,cvtsi2sd/mbed-os,cvtsi2sd/mbed-os,kpurusho/mbed,bikeNomad/mbed,fanghuaqi/mbed,tung7970/mbed-os-1,nabilbendafi/mbed,adustm/mbed,hwfwgrp/mbed,hwfwgrp/mbed,pi19404/mbed,nRFMesh/mbed-os,CalSol/mbed,radhika-raghavendran/mbed-os5.1-onsemi,struempelix/mbed,svastm/mbed,ryankurte/mbed-os,andcor02/mbed-os,RonEld/mbed,getopenmono/mbed,GustavWi/mbed,HeadsUpDisplayInc/mbed,adamgreen/mbed,andcor02/mbed-os,betzw/mbed-os,Shengliang/mbed,wodji/mbed,getopenmono/mbed,jferreir/mbed,rgrover/mbed,pradeep-gr/mbed-os5-onsemi,pedromes/mbed,mnlipp/mbed,tung7970/mbed-os,ryankurte/mbed-os,jamesadevine/mbed,al177/mbed,jferreir/mbed,wodji/mbed,HeadsUpDisplayInc/mbed,j-greffe/mbed-os,RonEld/mbed,bikeNomad/mbed,DanKupiniak/mbed,bulislaw/mbed-os,dbestm/mbed,andcor02/mbed-os,Timmmm/mbed,mnlipp/mbed,netzimme/mbed-os,EmuxEvans/mbed,getopenmono/mbed,Marcomissyou/mbed,YarivCol/mbed-os,ban4jp/mbed,bulislaw/mbed-os,adustm/mbed,Shengliang/mbed,Tiryoh/mbed,naves-thiago/mbed-midi,naves-thiago/mbed-midi,larks/mbed,tung7970/mbed-os,j-greffe/mbed-os,adustm/mbed,theotherjimmy/mbed,nvlsianpu/mbed,CalSol/mbed,JasonHow44/mbed,brstew/MBED-BUILD,mbedmicro/mbed,alertby/mbed,infinnovation/mbed-os,masaohamanaka/mbed,devanlai/mbed,rosterloh/mbed,jrjang/mbed,Shengliang/mbed,bentwire/mbed,geky/mbed,naves-thiago/mbed-midi,catiedev/mbed-os,maximmbed/mbed,brstew/MBED-BUILD,bentwire/mbed,infinnovation/mbed-os,infinnovation/mbed-os,fanghuaqi/mbed,tung7970/mbed-os-1,pedromes/mbed,betzw/mbed-os,YarivCol/mbed-os,Marcomissyou/mbed,mazimkhan/mbed-os,Archcady/mbed-os,fanghuaqi/mbed,Willem23/mbed,tung7970/mbed-os-1,karsev/mbed-os,ARM-software/mbed-beetle,iriark01/mbed-drivers,FranklyDev/mbed,bremoran/mbed-drivers,NordicSemiconductor/mbed,bentwire/mbed,jamesadevine/mbed,jamesadevine/mbed,mazimkhan/mbed-os,bcostm/mbed-os,GustavWi/mbed,masaohamanaka/mbed,autopulated/mbed,geky/mbed,kjbracey-arm/mbed,K4zuki/mbed,NitinBhaskar/mbed,nRFMesh/mbed-os,nabilbendafi/mbed,fpiot/mbed-ats,jferreir/mbed,rgrover/mbed,rosterloh/mbed,getopenmono/mbed,Marcomissyou/mbed,jpbrucker/mbed,Tiryoh/mbed,andcor02/mbed-os,mikaleppanen/mbed-os,rosterloh/mbed,pedromes/mbed,K4zuki/mbed,jrjang/mbed,nvlsianpu/mbed,mazimkhan/mbed-os,larks/mbed,ryankurte/mbed-os,kpurusho/mbed,mnlipp/mbed,xcrespo/mbed,dbestm/mbed,struempelix/mbed,FranklyDev/mbed,bentwire/mbed,dbestm/mbed,fahhem/mbed-os,fvincenzo/mbed-os,pradeep-gr/mbed-os5-onsemi,andreaslarssonublox/mbed,mazimkhan/mbed-os,masaohamanaka/mbed,dbestm/mbed,autopulated/mbed,j-greffe/mbed-os,NordicSemiconductor/mbed,NXPmicro/mbed,DanKupiniak/mbed,jeremybrodt/mbed,andcor02/mbed-os,FranklyDev/mbed,Willem23/mbed,kpurusho/mbed,mmorenobarm/mbed-os,Sweet-Peas/mbed,alertby/mbed,fahhem/mbed-os,logost/mbed,c1728p9/mbed-os,nRFMesh/mbed-os,kl-cruz/mbed-os,mnlipp/mbed,nvlsianpu/mbed,mbedmicro/mbed,struempelix/mbed,HeadsUpDisplayInc/mbed,monkiineko/mbed-os,Marcomissyou/mbed,YarivCol/mbed-os,mazimkhan/mbed-os,nRFMesh/mbed-os,nvlsianpu/mbed,Timmmm/mbed,brstew/MBED-BUILD,sam-geek/mbed,getopenmono/mbed,theotherjimmy/mbed,adamgreen/mbed,karsev/mbed-os,sg-/mbed-drivers,bikeNomad/mbed,logost/mbed,devanlai/mbed,monkiineko/mbed-os,adustm/mbed,c1728p9/mbed-os,xcrespo/mbed,pi19404/mbed,j-greffe/mbed-os,EmuxEvans/mbed,logost/mbed,radhika-raghavendran/mbed-os5.1-onsemi,Timmmm/mbed,autopulated/mbed,sam-geek/mbed,rosterloh/mbed,maximmbed/mbed,naves-thiago/mbed-midi,jpbrucker/mbed,jeremybrodt/mbed,kpurusho/mbed,Willem23/mbed,iriark01/mbed-drivers,pbrook/mbed,fahhem/mbed-os,ban4jp/mbed,K4zuki/mbed,jpbrucker/mbed,fpiot/mbed-ats,jpbrucker/mbed,pbrook/mbed,mikaleppanen/mbed-os,monkiineko/mbed-os,maximmbed/mbed,mikaleppanen/mbed-os,andreaslarssonublox/mbed,fpiot/mbed-ats,K4zuki/mbed,mazimkhan/mbed-os,Archcady/mbed-os,Sweet-Peas/mbed,hwfwgrp/mbed,mbedmicro/mbed,Shengliang/mbed,monkiineko/mbed-os,JasonHow44/mbed,tung7970/mbed-os-1,getopenmono/mbed,adamgreen/mbed,bcostm/mbed-os,NordicSemiconductor/mbed,bcostm/mbed-os,catiedev/mbed-os,struempelix/mbed,ban4jp/mbed,screamerbg/mbed,rgrover/mbed,karsev/mbed-os,NitinBhaskar/mbed,al177/mbed,Archcady/mbed-os,netzimme/mbed-os,devanlai/mbed,masaohamanaka/mbed,ARM-software/mbed-beetle,monkiineko/mbed-os,bulislaw/mbed-os,ARM-software/mbed-beetle,bcostm/mbed-os,dbestm/mbed,rgrover/mbed,autopulated/mbed,0xc0170/mbed-drivers,j-greffe/mbed-os,netzimme/mbed-os,tung7970/mbed-os,RonEld/mbed,HeadsUpDisplayInc/mbed,CalSol/mbed,kl-cruz/mbed-os,j-greffe/mbed-os,fahhem/mbed-os,betzw/mbed-os,ryankurte/mbed-os,svastm/mbed,svogl/mbed-os,jamesadevine/mbed,EmuxEvans/mbed,Archcady/mbed-os,nRFMesh/mbed-os,al177/mbed,Timmmm/mbed,Tiryoh/mbed,nvlsianpu/mbed,bentwire/mbed,screamerbg/mbed,Archcady/mbed-os,bcostm/mbed-os,naves-thiago/mbed-midi,nabilbendafi/mbed,pi19404/mbed,ban4jp/mbed,al177/mbed,pi19404/mbed,catiedev/mbed-os,Sweet-Peas/mbed,fahhem/mbed-os,infinnovation/mbed-os,pbrook/mbed,K4zuki/mbed,arostm/mbed-os,Tiryoh/mbed,mikaleppanen/mbed-os,theotherjimmy/mbed,bulislaw/mbed-os,netzimme/mbed-os,kjbracey-arm/mbed,karsev/mbed-os,c1728p9/mbed-os,ryankurte/mbed-os,EmuxEvans/mbed,svastm/mbed,Shengliang/mbed,netzimme/mbed-os,maximmbed/mbed,kl-cruz/mbed-os,pradeep-gr/mbed-os5-onsemi,arostm/mbed-os,rosterloh/mbed,EmuxEvans/mbed,NXPmicro/mbed,al177/mbed,pradeep-gr/mbed-os5-onsemi,radhika-raghavendran/mbed-os5.1-onsemi,arostm/mbed-os,arostm/mbed-os,arostm/mbed-os,jpbrucker/mbed,bulislaw/mbed-os,kpurusho/mbed,larks/mbed,geky/mbed,kjbracey-arm/mbed,dbestm/mbed,mmorenobarm/mbed-os,GustavWi/mbed,adamgreen/mbed,wodji/mbed,ban4jp/mbed,radhika-raghavendran/mbed-os5.1-onsemi,CalSol/mbed,theotherjimmy/mbed,rosterloh/mbed,bulislaw/mbed-os,Tiryoh/mbed,al177/mbed,YarivCol/mbed-os,infinnovation/mbed-os,kl-cruz/mbed-os,larks/mbed,mnlipp/mbed,cvtsi2sd/mbed-os,jrjang/mbed,fvincenzo/mbed-os,fpiot/mbed-ats,geky/mbed,theotherjimmy/mbed,nabilbendafi/mbed,tung7970/mbed-os,masaohamanaka/mbed,andreaslarssonublox/mbed,EmuxEvans/mbed,jamesadevine/mbed,alertby/mbed,mnlipp/mbed,xcrespo/mbed,cvtsi2sd/mbed-os,adustm/mbed,DanKupiniak/mbed,nRFMesh/mbed-os,larks/mbed,jrjang/mbed,betzw/mbed-os,c1728p9/mbed-os,screamerbg/mbed,pbrook/mbed,logost/mbed,betzw/mbed-os,monkiineko/mbed-os,JasonHow44/mbed,bikeNomad/mbed,karsev/mbed-os,adamgreen/mbed,andcor02/mbed-os,c1728p9/mbed-os,bcostm/mbed-os,mmorenobarm/mbed-os,Timmmm/mbed,pradeep-gr/mbed-os5-onsemi,radhika-raghavendran/mbed-os5.1-onsemi,fvincenzo/mbed-os,jrjang/mbed,ryankurte/mbed-os,brstew/MBED-BUILD,svogl/mbed-os,Sweet-Peas/mbed,RonEld/mbed,pbrook/mbed,maximmbed/mbed,rgrover/mbed,pbrook/mbed,jeremybrodt/mbed,xcrespo/mbed,NXPmicro/mbed,logost/mbed,struempelix/mbed,YarivCol/mbed-os,catiedev/mbed-os,fvincenzo/mbed-os,jferreir/mbed,NordicSemiconductor/mbed,kpurusho/mbed,Marcomissyou/mbed,naves-thiago/mbed-midi,arostm/mbed-os,c1728p9/mbed-os,pedromes/mbed,fpiot/mbed-ats,svogl/mbed-os,jpbrucker/mbed,betzw/mbed-os,catiedev/mbed-os,jamesadevine/mbed
|
e4c6b241a94c6828710faa00e1ac9188c26667eb
|
shared-module/_protomatter/allocator.h
|
shared-module/_protomatter/allocator.h
|
#ifndef MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H
#define MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H
#include <stdbool.h>
#include "py/gc.h"
#include "py/misc.h"
#include "supervisor/memory.h"
#define _PM_ALLOCATOR _PM_allocator_impl
#define _PM_FREE(x) (_PM_free_impl((x)), (x)=NULL, (void)0)
static inline void *_PM_allocator_impl(size_t sz) {
if (gc_alloc_possible()) {
return m_malloc(sz + sizeof(void*), true);
} else {
supervisor_allocation *allocation = allocate_memory(align32_size(sz), true);
return allocation ? allocation->ptr : NULL;
}
}
static inline void _PM_free_impl(void *ptr_in) {
supervisor_allocation *allocation = allocation_from_ptr(ptr_in);
if (allocation) {
free_memory(allocation);
}
}
#endif
|
#ifndef MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H
#define MICROPY_INCLUDED_SHARED_MODULE_PROTOMATTER_ALLOCATOR_H
#include <stdbool.h>
#include "py/gc.h"
#include "py/misc.h"
#include "supervisor/memory.h"
#define _PM_ALLOCATOR _PM_allocator_impl
#define _PM_FREE(x) (_PM_free_impl((x)), (x)=NULL, (void)0)
static inline void *_PM_allocator_impl(size_t sz) {
if (gc_alloc_possible()) {
return m_malloc(sz + sizeof(void*), true);
} else {
supervisor_allocation *allocation = allocate_memory(align32_size(sz), false);
return allocation ? allocation->ptr : NULL;
}
}
static inline void _PM_free_impl(void *ptr_in) {
supervisor_allocation *allocation = allocation_from_ptr(ptr_in);
if (allocation) {
free_memory(allocation);
}
}
#endif
|
Use low end of supervisor heap
|
protomatter: Use low end of supervisor heap
Per @tannewt, this area "sees more churn", so it's probably the right
choice here
|
C
|
mit
|
adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython
|
f7c992a59e005e2f555a75cc23c83948c856435a
|
src/writer/verilog/task.h
|
src/writer/verilog/task.h
|
// -*- C++ -*-
#ifndef _writer_verilog_task_h_
#define _writer_verilog_task_h_
#include "writer/verilog/resource.h"
namespace iroha {
namespace writer {
namespace verilog {
class Task : public Resource {
public:
Task(const IResource &res, const Table &table);
virtual void BuildResource();
virtual void BuildInsn(IInsn *insn, State *st);
static bool IsTask(const Table &table);
static string TaskEnablePin(const ITable &tab, const ITable *caller);
static const int kTaskEntryStateId;
private:
void BuildTaskResource();
void BuildTaskCallResource();
void BuildCallWire(IResource *caller);
void BuildTaskCallInsn(IInsn *insn, State *st);
void AddPort(const IModule *mod, IResource *caller);
void AddWire(const IModule *mod, IResource *caller);
static string TaskPinPrefix(const ITable &tab, const ITable *caller);
static string TaskAckPin(const ITable &tab, const ITable *caller);
};
} // namespace verilog
} // namespace writer
} // namespace iroha
#endif // _writer_verilog_task_h_
|
// -*- C++ -*-
#ifndef _writer_verilog_task_h_
#define _writer_verilog_task_h_
#include "writer/verilog/resource.h"
namespace iroha {
namespace writer {
namespace verilog {
class Task : public Resource {
public:
Task(const IResource &res, const Table &table);
virtual void BuildResource();
virtual void BuildInsn(IInsn *insn, State *st);
static bool IsTask(const Table &table);
static string TaskEnablePin(const ITable &tab, const ITable *caller);
static const int kTaskEntryStateId;
private:
void BuildTaskResource();
void BuildTaskCallResource();
void BuildCallWire(IResource *caller);
void BuildTaskCallInsn(IInsn *insn, State *st);
void AddPort(const IModule *mod, IResource *caller, bool upward);
void AddWire(const IModule *mod, IResource *caller);
static string TaskPinPrefix(const ITable &tab, const ITable *caller);
static string TaskAckPin(const ITable &tab, const ITable *caller);
};
} // namespace verilog
} // namespace writer
} // namespace iroha
#endif // _writer_verilog_task_h_
|
Fix a missed file in previous change.
|
Fix a missed file in previous change.
|
C
|
bsd-3-clause
|
nlsynth/iroha,nlsynth/iroha
|
6dfebcd2cca5a3e6cb7668c43ff30c4619026c75
|
source/crate_demo/game_state_manager.h
|
source/crate_demo/game_state_manager.h
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef CRATE_DEMO_GAME_STATE_MANAGER_H
#define CRATE_DEMO_GAME_STATE_MANAGER_H
#include "common/game_state_manager_interface.h"
namespace CrateDemo {
class GameStateManager : public Common::IGameStateManager {
public:
GameStateManager();
private:
public:
bool Initialize();
void Shutdown();
/**
* Return the wanted period of time between update() calls.
*
* IE: If you want update to be called 20 times a second, this
* should return 50.
*
* NOTE: This should probably be inlined.
* NOTE: This will only be called at the beginning of HalflingEngine::Run()
* TODO: Contemplate the cost/benefit of calling this once per frame
*
* @return The period in milliseconds
*/
inline double GetUpdatePeriod() { return 30.0; }
/**
* Called every time the game logic should be updated. The frequency
* of this being called is determined by getUpdatePeriod()
*/
void Update();
void GamePaused();
void GameUnpaused();
};
} // End of namespace CrateDemo
#endif
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef CRATE_DEMO_GAME_STATE_MANAGER_H
#define CRATE_DEMO_GAME_STATE_MANAGER_H
#include "common/game_state_manager_base.h"
namespace CrateDemo {
class GameStateManager : public Common::GameStateManagerBase {
public:
GameStateManager();
private:
public:
bool Initialize();
void Shutdown();
/**
* Return the wanted period of time between update() calls.
*
* IE: If you want update to be called 20 times a second, this
* should return 50.
*
* NOTE: This should probably be inlined.
* NOTE: This will only be called at the beginning of HalflingEngine::Run()
* TODO: Contemplate the cost/benefit of calling this once per frame
*
* @return The period in milliseconds
*/
inline double GetUpdatePeriod() { return 30.0; }
/**
* Called every time the game logic should be updated. The frequency
* of this being called is determined by getUpdatePeriod()
*/
void Update();
void GamePaused();
void GameUnpaused();
};
} // End of namespace CrateDemo
#endif
|
Update GameStateManager to use new base class name
|
CRATE_DEMO: Update GameStateManager to use new base class name
|
C
|
apache-2.0
|
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
|
f61acc197adfc2a6c69f9da6e5f33036a502983e
|
src/condor_ckpt/fcntl.h
|
src/condor_ckpt/fcntl.h
|
#if defined(__cplusplus) && !defined(OSF1) /* GNU G++ */
# include "fix_gnu_fcntl.h"
#elif defined(AIX32) /* AIX bsdcc */
typedef unsigned short ushort;
# include <fcntl.h>
#elif defined(HPUX9) /* HPUX 9 */
# define fcntl __condor_hide_fcntl
# include <fcntl.h>
# undef fcntl
int fcntl( int fd, int req, int arg );
#else /* Everybody else */
# include <fcntl.h>
#endif
|
#if defined(__cplusplus) && !defined(OSF1) /* GNU G++ */
# include "fix_gnu_fcntl.h"
#elif defined(AIX32) /* AIX bsdcc */
# if !defined(_ALL_SOURCE)
typedef ushort_t ushort;
# endif
# include <fcntl.h>
#elif defined(HPUX9) /* HPUX 9 */
# define fcntl __condor_hide_fcntl
# include <fcntl.h>
# undef fcntl
int fcntl( int fd, int req, int arg );
#else /* Everybody else */
# include <fcntl.h>
#endif
|
Make sure that for AIX 3.2 we get ushort defined when we need it, but not doubly defined...
|
Make sure that for AIX 3.2 we get ushort defined when we need it, but
not doubly defined...
|
C
|
apache-2.0
|
bbockelm/condor-network-accounting,djw8605/condor,htcondor/htcondor,clalancette/condor-dcloud,djw8605/condor,djw8605/condor,htcondor/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,mambelli/osg-bosco-marco,htcondor/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,htcondor/htcondor,zhangzhehust/htcondor,htcondor/htcondor,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,djw8605/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,neurodebian/htcondor,neurodebian/htcondor,neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,htcondor/htcondor,bbockelm/condor-network-accounting,djw8605/condor,clalancette/condor-dcloud,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,neurodebian/htcondor,djw8605/condor,zhangzhehust/htcondor,djw8605/condor,bbockelm/condor-network-accounting,djw8605/htcondor,neurodebian/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,neurodebian/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/htcondor,djw8605/condor
|
c584028875926b3a193e480e16bfc19b1c613438
|
turing.h
|
turing.h
|
#ifndef TURING_H_
#define TURING_H_
#define TAPE_LEN 1024
#define turing_error(...) fprintf(stderr, __VA_ARGS__);\
return TURING_ERROR
typedef int bool;
typedef enum {
TURING_OK,
TURING_HALT,
TURING_ERROR
} turing_status_t;
typedef struct Turing {
bool *tape;
bool *p;
} Turing;
Turing *init_turing();
void free_turing(Turing *turing);
turing_status_t move_head(Turing *turing, int direction);
turing_status_t execute_instruction(Turing *turing, char *program);
turing_status_t execute_definite_instruction(Turing *turing, char *program);
#endif // TURING_H_
|
#ifndef TURING_H_
#define TURING_H_
#define TAPE_LEN 1024
#define turing_error(...) fprintf(stderr, __VA_ARGS__);\
return TURING_ERROR
#define move_head_left(t) move_head(t, 0)
#define move_head_right(t) move_head(t, 1)
typedef int bool;
typedef enum {
TURING_OK,
TURING_HALT,
TURING_ERROR
} turing_status_t;
typedef struct Turing {
bool *tape;
bool *p;
} Turing;
Turing *init_turing();
void free_turing(Turing *turing);
turing_status_t move_head(Turing *turing, int direction);
turing_status_t execute_instruction(Turing *turing, char *program);
turing_status_t execute_definite_instruction(Turing *turing, char *program);
#endif // TURING_H_
|
Implement left and right macros
|
Implement left and right macros
|
C
|
mit
|
mindriot101/turing-machine
|
09bb0bf7b1a23d056db347286539611f38145da7
|
Plugin/CppApi/include/ArcGISRuntimeToolkit.h
|
Plugin/CppApi/include/ArcGISRuntimeToolkit.h
|
// Copyright 2016 ESRI
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
//
// See the Sample code usage restrictions document for further information.
//
#ifndef ArcGISRuntimeToolkit_H
#define ArcGISRuntimeToolkit_H
#include <QQmlExtensionPlugin>
#include "ToolkitCommon.h"
namespace Esri
{
namespace ArcGISRuntime
{
namespace Toolkit
{
class TOOLKIT_EXPORT ArcGISRuntimeToolkit : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
explicit ArcGISRuntimeToolkit(QObject* parent = nullptr);
void registerTypes(const char* uri);
static void registerToolkitTypes(const char* uri = "Esri.ArcGISRuntime.Toolkit.CppApi");
private:
static constexpr int s_versionMajor = 100;
static constexpr int s_versionMinor = 2;
};
} // Toolkit
} // ArcGISRuntime
} // Esri
#endif // ArcGISRuntimeToolkit_H
|
// Copyright 2016 ESRI
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
//
// See the Sample code usage restrictions document for further information.
//
#ifndef ArcGISRuntimeToolkit_H
#define ArcGISRuntimeToolkit_H
#include <QQmlExtensionPlugin>
#include "ToolkitCommon.h"
namespace Esri
{
namespace ArcGISRuntime
{
namespace Toolkit
{
class TOOLKIT_EXPORT ArcGISRuntimeToolkit : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
explicit ArcGISRuntimeToolkit(QObject* parent = nullptr);
void registerTypes(const char* uri);
static void registerToolkitTypes(const char* uri = "Esri.ArcGISRuntime.Toolkit.CppApi");
private:
static constexpr int s_versionMajor = 100;
static constexpr int s_versionMinor = 3;
};
} // Toolkit
} // ArcGISRuntime
} // Esri
#endif // ArcGISRuntimeToolkit_H
|
Update registration version for 100.3
|
Update registration version for 100.3
|
C
|
apache-2.0
|
Esri/arcgis-runtime-toolkit-qt,Esri/arcgis-runtime-toolkit-qt,Esri/arcgis-runtime-toolkit-qt
|
4ca8b01f499f2c3a72191e6eb89a7790cf8af7ef
|
src/tests/enesim_test_renderer_error.c
|
src/tests/enesim_test_renderer_error.c
|
#include "Enesim.h"
int main(int argc, char **argv)
{
Enesim_Renderer *r;
Enesim_Surface *s;
Enesim_Log *error = NULL;
enesim_init();
r = enesim_renderer_rectangle_new();
enesim_renderer_shape_fill_color_set(r, 0xffffffff);
/* we dont set any property to force the error */
s = enesim_surface_new(ENESIM_FORMAT_ARGB8888, 320, 240);
if (!enesim_renderer_draw(r, s, ENESIM_ROP_FILL, NULL, 0, 0, &error))
{
enesim_log_dump(error);
enesim_log_delete(error);
}
enesim_shutdown();
return 0;
}
|
#include "Enesim.h"
int main(int argc, char **argv)
{
Enesim_Renderer *r;
Enesim_Surface *s;
Enesim_Log *error = NULL;
enesim_init();
r = enesim_renderer_rectangle_new();
enesim_renderer_shape_fill_color_set(r, 0xffffffff);
/* we dont set any property to force the error */
s = enesim_surface_new(ENESIM_FORMAT_ARGB8888, 320, 240);
if (!enesim_renderer_draw(r, s, ENESIM_ROP_FILL, NULL, 0, 0, &error))
{
enesim_log_dump(error);
enesim_log_unref(error);
}
enesim_shutdown();
return 0;
}
|
Use the new log API
|
Use the new log API
|
C
|
lgpl-2.1
|
turran/enesim,turran/enesim,turran/enesim,turran/enesim
|
41d07a68c0a5cfed255d3ad628d0d41687ca00df
|
tests/regression/04-mutex/37-indirect_rc.c
|
tests/regression/04-mutex/37-indirect_rc.c
|
#include <pthread.h>
int g;
int *g1;
int *g2;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&mutex);
(*g1)++; // RACE!
pthread_mutex_lock(&mutex);
return NULL;
}
int main(void) {
pthread_t id;
int x;
g1 = g2 = &g;
pthread_create(&id, NULL, t_fun, NULL);
(*g2)++; // RACE!
pthread_join (id, NULL);
return 0;
}
|
#include <pthread.h>
int g;
int *g1;
int *g2;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&mutex);
(*g1)++; // RACE!
pthread_mutex_unlock(&mutex);
return NULL;
}
int main(void) {
pthread_t id;
int x;
g1 = g2 = &g;
pthread_create(&id, NULL, t_fun, NULL);
(*g2)++; // RACE!
pthread_join (id, NULL);
return 0;
}
|
Fix lock-unlock copy-paste mistake in 04/37
|
Fix lock-unlock copy-paste mistake in 04/37
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
c7ee376f947ec1d3e81d49e2c4a81adf1c292c1d
|
libc/sysdeps/linux/common/getrusage.c
|
libc/sysdeps/linux/common/getrusage.c
|
/* vi: set sw=4 ts=4: */
/*
* getrusage() for uClibc
*
* Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
*
* GNU Library General Public License (LGPL) version 2 or later.
*/
#include "syscalls.h"
#include <unistd.h>
#include <wait.h>
_syscall2(int, getrusage, int, who, struct rusage *, usage);
|
/* vi: set sw=4 ts=4: */
/*
* getrusage() for uClibc
*
* Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
*
* GNU Library General Public License (LGPL) version 2 or later.
*/
#include "syscalls.h"
#include <unistd.h>
#include <wait.h>
_syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage);
|
Correct type, gcc-3.4.5 fails, thanks nitinkg for reporting/testing
|
Correct type, gcc-3.4.5 fails, thanks nitinkg for reporting/testing
|
C
|
lgpl-2.1
|
foss-for-synopsys-dwc-arc-processors/uClibc,ChickenRunjyd/klee-uclibc,ysat0/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,brgl/uclibc-ng,ChickenRunjyd/klee-uclibc,ysat0/uClibc,kraj/uClibc,ndmsystems/uClibc,wbx-github/uclibc-ng,majek/uclibc-vx32,hjl-tools/uClibc,mephi42/uClibc,hwoarang/uClibc,ndmsystems/uClibc,czankel/xtensa-uclibc,hwoarang/uClibc,OpenInkpot-archive/iplinux-uclibc,ChickenRunjyd/klee-uclibc,hwoarang/uClibc,hjl-tools/uClibc,atgreen/uClibc-moxie,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,hwoarang/uClibc,kraj/uclibc-ng,czankel/xtensa-uclibc,waweber/uclibc-clang,klee/klee-uclibc,foss-xtensa/uClibc,ffainelli/uClibc,groundwater/uClibc,foss-xtensa/uClibc,kraj/uClibc,skristiansson/uClibc-or1k,kraj/uclibc-ng,wbx-github/uclibc-ng,waweber/uclibc-clang,foss-xtensa/uClibc,skristiansson/uClibc-or1k,gittup/uClibc,atgreen/uClibc-moxie,ysat0/uClibc,hjl-tools/uClibc,wbx-github/uclibc-ng,kraj/uClibc,klee/klee-uclibc,klee/klee-uclibc,hjl-tools/uClibc,OpenInkpot-archive/iplinux-uclibc,ddcc/klee-uclibc-0.9.33.2,kraj/uclibc-ng,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,m-labs/uclibc-lm32,ndmsystems/uClibc,majek/uclibc-vx32,groundwater/uClibc,mephi42/uClibc,brgl/uclibc-ng,groundwater/uClibc,kraj/uclibc-ng,gittup/uClibc,atgreen/uClibc-moxie,czankel/xtensa-uclibc,m-labs/uclibc-lm32,ddcc/klee-uclibc-0.9.33.2,hjl-tools/uClibc,kraj/uClibc,waweber/uclibc-clang,brgl/uclibc-ng,groundwater/uClibc,m-labs/uclibc-lm32,waweber/uclibc-clang,ffainelli/uClibc,ffainelli/uClibc,foss-xtensa/uClibc,OpenInkpot-archive/iplinux-uclibc,czankel/xtensa-uclibc,gittup/uClibc,brgl/uclibc-ng,gittup/uClibc,skristiansson/uClibc-or1k,m-labs/uclibc-lm32,foss-for-synopsys-dwc-arc-processors/uClibc,skristiansson/uClibc-or1k,atgreen/uClibc-moxie,majek/uclibc-vx32,groundwater/uClibc,OpenInkpot-archive/iplinux-uclibc,ChickenRunjyd/klee-uclibc,ddcc/klee-uclibc-0.9.33.2,ysat0/uClibc,klee/klee-uclibc,wbx-github/uclibc-ng,mephi42/uClibc,ndmsystems/uClibc,mephi42/uClibc
|
76ea7e35cc30ffe119cfe0b7ce2397ca4cb7a88a
|
test/CodeGen/stack-size-section.c
|
test/CodeGen/stack-size-section.c
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT
// CHECK-ABSENT-NOT: section .stack_sizes
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT
// CHECK-PRESENT: section .stack_sizes
int foo() { return 42; }
|
// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT
// CHECK-ABSENT-NOT: section .stack_sizes
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT
// CHECK-PRESENT: section .stack_sizes
int foo() { return 42; }
|
Fix test added in r321992 failing on some buildbots (again), test requires x86.
|
Fix test added in r321992 failing on some buildbots (again), test requires x86.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@322000 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
0b7ec39c2d41c26fc00e50367b5a2cc47be7fede
|
src/pch.h
|
src/pch.h
|
//
// pch.h
// Header for standard system include files.
//
#ifndef _divida_precompiled_header_h_
#define _divida_precompiled_header_h_
#ifdef WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
#include <algorithm>
#include <iomanip>
#include <string>
#include <sstream>
#endif
|
//
// pch.h
// Header for standard system include files.
//
#ifndef _divida_precompiled_header_h_
#define _divida_precompiled_header_h_
#ifdef WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif
#include <algorithm>
#include <iomanip>
#include <memory>
#include <string>
#include <sstream>
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
namespace std
{
template<typename T, typename ...Args>
unique_ptr<T> make_unique(Args&& ...args)
{
return unique_ptr<T>(new T(std::forward<Args>(args)...));
}
}
#endif
#endif
|
Add backup implementation of std::make_unique.
|
Add backup implementation of std::make_unique.
|
C
|
mit
|
chrisculy/Divida,chrisculy/Divida
|
8c040708668c09654682c3133c3c16aa691f3bf9
|
libtock/ambient_light.c
|
libtock/ambient_light.c
|
#include "ambient_light.h"
#include "tock.h"
typedef struct {
int intensity;
bool fired;
} ambient_light_data_t;
// callback for synchronous reads
static void ambient_light_cb(int intensity,
__attribute__ ((unused)) int unused1,
__attribute__ ((unused)) int unused2, void* ud) {
ambient_light_data_t* result = (ambient_light_data_t*)ud;
result->intensity = intensity;
result->fired = true;
}
int ambient_light_read_intensity_sync(int* lux_value) {
int err;
ambient_light_data_t result = {0};
result.fired = false;
err = ambient_light_subscribe(ambient_light_cb, (void*)(&result));
if (err < TOCK_SUCCESS) {
return err;
}
err = ambient_light_start_intensity_reading();
if (err < TOCK_SUCCESS) {
return err;
}
yield_for(&result.fired);
*lux_value = result.intensity;
return TOCK_SUCCESS;
}
int ambient_light_subscribe(subscribe_cb callback, void* userdata) {
return subscribe(DRIVER_NUM_AMBIENT_LIGHT, 0, callback, userdata);
}
int ambient_light_start_intensity_reading(void) {
return command(DRIVER_NUM_AMBIENT_LIGHT, 1, 0, 0);
}
|
#include "ambient_light.h"
#include "tock.h"
typedef struct {
int intensity;
bool fired;
} ambient_light_data_t;
// internal callback for faking synchronous reads
static void ambient_light_cb(int intensity,
__attribute__ ((unused)) int unused1,
__attribute__ ((unused)) int unused2, void* ud) {
ambient_light_data_t* result = (ambient_light_data_t*)ud;
result->intensity = intensity;
result->fired = true;
}
int ambient_light_read_intensity_sync(int* lux_value) {
int err;
ambient_light_data_t result = {0};
result.fired = false;
err = ambient_light_subscribe(ambient_light_cb, (void*)(&result));
if (err < TOCK_SUCCESS) {
return err;
}
err = ambient_light_start_intensity_reading();
if (err < TOCK_SUCCESS) {
return err;
}
yield_for(&result.fired);
*lux_value = result.intensity;
return TOCK_SUCCESS;
}
int ambient_light_subscribe(subscribe_cb callback, void* userdata) {
return subscribe(DRIVER_NUM_AMBIENT_LIGHT, 0, callback, userdata);
}
int ambient_light_start_intensity_reading(void) {
return command(DRIVER_NUM_AMBIENT_LIGHT, 1, 0, 0);
}
|
Revert "Updating ambient light to 2.0 API."
|
Revert "Updating ambient light to 2.0 API."
This reverts commit 9a9df3a205dcebfcb358b60ef11df54698ec6dce.
|
C
|
apache-2.0
|
tock/libtock-c,tock/libtock-c,tock/libtock-c
|
3f76bfade6c09f340aa3c5d1d53ea9bbb736761f
|
CefSharp.Core/Internals/StringVisitor.h
|
CefSharp.Core/Internals/StringVisitor.h
|
// Copyright 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_string_visitor.h"
namespace CefSharp
{
private class StringVisitor : public CefStringVisitor
{
private:
gcroot<IStringVisitor^> _visitor;
public:
StringVisitor(IStringVisitor^ visitor) :
_visitor(visitor)
{
}
~StringVisitor()
{
_visitor = nullptr;
}
virtual void Visit(const CefString& string) OVERRIDE;
IMPLEMENT_REFCOUNTING(StringVisitor);
};
}
|
// Copyright 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#pragma once
#include "Stdafx.h"
#include "include/cef_string_visitor.h"
namespace CefSharp
{
private class StringVisitor : public CefStringVisitor
{
private:
gcroot<IStringVisitor^> _visitor;
public:
StringVisitor(IStringVisitor^ visitor) :
_visitor(visitor)
{
}
~StringVisitor()
{
_visitor = nullptr;
}
virtual void Visit(const CefString& string) OVERRIDE;
IMPLEMENT_REFCOUNTING(StringVisitor);
};
}
|
Fix minor indentation issue (formatting)
|
Fix minor indentation issue (formatting)
|
C
|
bsd-3-clause
|
joshvera/CefSharp,windygu/CefSharp,haozhouxu/CefSharp,NumbersInternational/CefSharp,jamespearce2006/CefSharp,Livit/CefSharp,zhangjingpu/CefSharp,illfang/CefSharp,VioletLife/CefSharp,yoder/CefSharp,rlmcneary2/CefSharp,NumbersInternational/CefSharp,zhangjingpu/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,rlmcneary2/CefSharp,gregmartinhtc/CefSharp,twxstar/CefSharp,illfang/CefSharp,dga711/CefSharp,ITGlobal/CefSharp,yoder/CefSharp,zhangjingpu/CefSharp,haozhouxu/CefSharp,jamespearce2006/CefSharp,rlmcneary2/CefSharp,ruisebastiao/CefSharp,zhangjingpu/CefSharp,VioletLife/CefSharp,NumbersInternational/CefSharp,gregmartinhtc/CefSharp,twxstar/CefSharp,jamespearce2006/CefSharp,battewr/CefSharp,dga711/CefSharp,Haraguroicha/CefSharp,wangzheng888520/CefSharp,yoder/CefSharp,gregmartinhtc/CefSharp,yoder/CefSharp,Octopus-ITSM/CefSharp,windygu/CefSharp,battewr/CefSharp,dga711/CefSharp,illfang/CefSharp,wangzheng888520/CefSharp,jamespearce2006/CefSharp,ruisebastiao/CefSharp,ITGlobal/CefSharp,wangzheng888520/CefSharp,Haraguroicha/CefSharp,rover886/CefSharp,joshvera/CefSharp,ITGlobal/CefSharp,rover886/CefSharp,battewr/CefSharp,haozhouxu/CefSharp,AJDev77/CefSharp,twxstar/CefSharp,rlmcneary2/CefSharp,AJDev77/CefSharp,joshvera/CefSharp,ruisebastiao/CefSharp,gregmartinhtc/CefSharp,jamespearce2006/CefSharp,Haraguroicha/CefSharp,Octopus-ITSM/CefSharp,Livit/CefSharp,battewr/CefSharp,AJDev77/CefSharp,AJDev77/CefSharp,haozhouxu/CefSharp,VioletLife/CefSharp,VioletLife/CefSharp,Haraguroicha/CefSharp,Livit/CefSharp,rover886/CefSharp,illfang/CefSharp,dga711/CefSharp,windygu/CefSharp,Octopus-ITSM/CefSharp,Octopus-ITSM/CefSharp,rover886/CefSharp,Livit/CefSharp,NumbersInternational/CefSharp,ruisebastiao/CefSharp,twxstar/CefSharp,joshvera/CefSharp,rover886/CefSharp,ITGlobal/CefSharp,windygu/CefSharp
|
ea83ee487a59bb5d9fa122614886a2357b990e64
|
PHOS/AliPHOSPreprocessor.h
|
PHOS/AliPHOSPreprocessor.h
|
#ifndef ALIPHOSPREPROCESSOR_H
#define ALIPHOSPREPROCESSOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// Class AliPHOSPreprocessor
///////////////////////////////////////////////////////////////////////////////
#include "AliPreprocessor.h"
class AliPHOSPreprocessor : public AliPreprocessor {
public:
AliPHOSPreprocessor();
AliPHOSPreprocessor(const char* detector, AliShuttleInterface* shuttle);
protected:
virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
virtual UInt_t Process(TMap* valueSet);
ClassDef(AliPHOSPreprocessor,0);
};
#endif
|
#ifndef ALIPHOSPREPROCESSOR_H
#define ALIPHOSPREPROCESSOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// Class AliPHOSPreprocessor
///////////////////////////////////////////////////////////////////////////////
#include "AliPreprocessor.h"
class AliPHOSPreprocessor : public AliPreprocessor {
public:
AliPHOSPreprocessor();
AliPHOSPreprocessor(const char* detector, AliShuttleInterface* shuttle);
protected:
virtual UInt_t Process(TMap* valueSet);
ClassDef(AliPHOSPreprocessor,0);
};
#endif
|
Remove declaration of unimplemented method
|
Remove declaration of unimplemented method
|
C
|
bsd-3-clause
|
coppedis/AliRoot,shahor02/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,miranov25/AliRoot,miranov25/AliRoot,alisw/AliRoot,alisw/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,shahor02/AliRoot,coppedis/AliRoot,jgrosseo/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,alisw/AliRoot,alisw/AliRoot,sebaleh/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,jgrosseo/AliRoot,alisw/AliRoot,alisw/AliRoot,miranov25/AliRoot,coppedis/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ALICEHLT/AliRoot,sebaleh/AliRoot,coppedis/AliRoot,ecalvovi/AliRoot,miranov25/AliRoot,miranov25/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,shahor02/AliRoot,shahor02/AliRoot,mkrzewic/AliRoot,coppedis/AliRoot,coppedis/AliRoot,sebaleh/AliRoot,mkrzewic/AliRoot,jgrosseo/AliRoot,coppedis/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ALICEHLT/AliRoot,jgrosseo/AliRoot,shahor02/AliRoot,jgrosseo/AliRoot,alisw/AliRoot
|
17c191e8231e6429309bd6cc8e826eb38b9d8d89
|
include/bubblesorts-bubble-inl.h
|
include/bubblesorts-bubble-inl.h
|
#ifndef SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
#define SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
namespace sorting {
namespace bubble {
template <class T>
void BubbleSort(T * const array, const int N)
/**
* Bubble sort: Bubble sort
* Scaling:
* Best case:
* Worst case:
* Useful:
*
*/
{
}
} // namespace bubble
} // namespace sorting
#endif // SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
|
#ifndef SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
#define SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
namespace sorting {
namespace bubble {
template <class T>
void BubbleSort(T * const array, const int N)
/**
* Bubble sort: Bubble sort
* Scaling:
* Best case:
* Worst case:
* Useful:
*
*/
{
int pass_count = 0; // Number of pass over the array.
int swap_count = 0; // Number of swap for a single pass.
// Pass over the array while the swap count is non-null.
do
{
// It's a new pass; reset the count of swap.
swap_count = 0;
// Iterate over the array, skipping the last item
for (int i = 0 ; i < N-1 ; i++)
{
// Swap elements if next one is "smaller" and register the swap.
if (array[i] > array[i+1])
{
std::swap(array[i], array[i+1]);
swap_count++;
}
}
pass_count++;
} while (swap_count != 0);
}
} // namespace bubble
} // namespace sorting
#endif // SORTING_INCLUDE_BUBBLESORTS_BUBBLE_INL_H_
|
Add working bubble sort implementation
|
Add working bubble sort implementation
|
C
|
bsd-3-clause
|
nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting,nbigaouette/sorting
|
e2b4f630a3880e4b30a960890672acf8dffa0dbd
|
src/units/unit.h
|
src/units/unit.h
|
#ifndef UNITS_UNIT_H_
#define UNITS_UNIT_H_
#include <SFML/Graphics.hpp>
#include "engine/instance.h"
#include "base/aliases.h"
class Unit : public Instance {
public:
Unit();
virtual ~Unit();
virtual void Step(sf::Time elapsed);
void set_life(unsigned life) {
life_ = life;
}
unsigned life() {
return life_;
}
void set_position(Vec2f pos) {
sprite_.set_position(pos);
}
Vec2f position() {
return sprite_.getPosition();
}
void set_movement_speed(Vec2f movement_speed) {
movement_speed_ = movement_speed;
}
void set_attack_speed(unsigned attack_speed) {
attack_speed_ = attack_speed;
}
protected:
unsigned life_;
unsigned damage_;
unsigned attack_speed_;
Vec2f movement_speed_;
};
#endif // UNITS_UNIT_H_
|
#ifndef UNITS_UNIT_H_
#define UNITS_UNIT_H_
#include <SFML/Graphics.hpp>
#include "engine/instance.h"
#include "base/aliases.h"
class Unit : public Instance {
public:
Unit();
virtual ~Unit();
virtual void Step(sf::Time elapsed);
void set_life(unsigned life) {
life_ = life;
}
unsigned life() {
return life_;
}
void set_position(Vec2f pos) {
sprite_.set_position(pos);
}
Vec2f position() {
return sprite_.position();
}
void set_movement_speed(Vec2f movement_speed) {
movement_speed_ = movement_speed;
}
void set_attack_speed(unsigned attack_speed) {
attack_speed_ = attack_speed;
}
protected:
unsigned life_;
unsigned damage_;
unsigned attack_speed_;
Vec2f movement_speed_;
};
#endif // UNITS_UNIT_H_
|
Rename function to the new version.
|
Rename function to the new version.
|
C
|
mit
|
davidgasquez/loto,davidgasquez/loto
|
92f64df6d3551bec6f5c14e78b1195a381f9fc11
|
src/isolate/v8_version.h
|
src/isolate/v8_version.h
|
// These macros weren't added until v8 version 4.4
#include "node_wrapper.h"
#ifndef V8_MAJOR_VERSION
#if NODE_MODULE_VERSION <= 11
#define V8_MAJOR_VERSION 3
#define V8_MINOR_VERSION 14
#define V8_PATCH_LEVEL 0
#elif V8_MAJOR_VERSION <= 14
#define V8_MAJOR_VERSION 3
#define V8_MINOR_VERSION 28
#define V8_PATCH_LEVEL 0
#else
#error v8 version macros missing
#endif
#endif
#define V8_AT_LEAST(major, minor, patch) (\
V8_MAJOR_VERSION > (major) || \
(V8_MAJOR_VERSION == (major) && V8_MINOR_VERSION >= (minor)) || \
(V8_MAJOR_VERSION == (major) && V8_MINOR_VERSION == (minor) && V8_PATCH_LEVEL >= (patch)) \
)
#define NODE_MODULE_OR_V8_AT_LEAST(nodejs, v8_major, v8_minor, v8_patch) (\
defined(NODE_MODULE_VERSION) ? NODE_MODULE_VERSION >= nodejs : V8_AT_LEAST(v8_major, v8_minor, v8_patch) \
)
|
// These macros weren't added until v8 version 4.4
#include "node_wrapper.h"
#ifndef V8_MAJOR_VERSION
#if NODE_MODULE_VERSION <= 11
#define V8_MAJOR_VERSION 3
#define V8_MINOR_VERSION 14
#define V8_PATCH_LEVEL 0
#elif V8_MAJOR_VERSION <= 14
#define V8_MAJOR_VERSION 3
#define V8_MINOR_VERSION 28
#define V8_PATCH_LEVEL 0
#else
#error v8 version macros missing
#endif
#endif
#define V8_AT_LEAST(major, minor, patch) (\
V8_MAJOR_VERSION > (major) || \
(V8_MAJOR_VERSION == (major) && V8_MINOR_VERSION >= (minor)) || \
(V8_MAJOR_VERSION == (major) && V8_MINOR_VERSION == (minor) && V8_PATCH_LEVEL >= (patch)) \
)
#ifdef NODE_MODULE_VERSION
#define NODE_MODULE_OR_V8_AT_LEAST(nodejs, v8_major, v8_minor, v8_patch) (NODE_MODULE_VERSION >= nodejs)
#else
#define NODE_MODULE_OR_V8_AT_LEAST(nodejs, v8_major, v8_minor, v8_patch) (V8_AT_LEAST(v8_major, v8_minor, v8_patch))
#endif
|
Fix msvc preprocessor error (omg)
|
Fix msvc preprocessor error (omg)
|
C
|
isc
|
laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm,laverdet/isolated-vm
|
2413283acfba846293a4476354cd2a88d79a8bb8
|
arc/arc/Model/FileSystem.h
|
arc/arc/Model/FileSystem.h
|
//
// FileSystem.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Folder.h"
@interface FileSystem : NSObject {
@private
Folder *_rootFolder; // The root folder.
}
// Returns the root folder of the entire file system.
- (Folder*)getRootFolder;
// Returns the single FileSystem instance.
+ (FileSystem*)getInstance;
@end
|
//
// FileSystem.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Folder.h"
@interface FileSystem : NSObject {
@private
Folder *_rootFolder; // The root folder.
}
// Returns the root folder of the entire file system.
- (Folder*)getRootFolder;
// Returns the single FileSystem instance.
+ (FileSystem*)getInstance;
// Returns an NSArray of FileObjects, corresponding to the contents
// of the given folder.
- (NSArray*)getFolderContents:(Folder*)folder;
// Returns an NSString containing the contents of the given file.
- (NSString*)getFileContents:(File*)file;
@end
|
Add signatures for content retrieval methods.
|
Add signatures for content retrieval methods.
|
C
|
mit
|
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
|
12fb043e39695727114f7d24e5e3b2911a79c7a4
|
Cerberus.h
|
Cerberus.h
|
#ifndef CERBERUS_H
#define CERBERUS_H
#include <iostream>
#include "ceres/ceres.h"
using namespace std;
using namespace ceres;
class Cerberus {
public:
Cerberus();
Solver::Options options;
LossFunction *loss;
Problem problem;
Solver::Summary summary;
void solve();
};
#endif
|
#ifndef CERBERUS_H
#define CERBERUS_H
#include <iostream>
#include "ceres/ceres.h"
#include "ceres/rotation.h"
using namespace std;
using namespace ceres;
class Cerberus {
public:
Cerberus();
Solver::Options options;
LossFunction *loss;
Problem problem;
Solver::Summary summary;
void solve();
};
// Rt is a 4x3 transformation matrix of the form [R|t]. result is a
// 6-dimensional vector with first three terms representing axis, magnitude
// angle, and the last three terms represent translation
template <typename T> void TransformationMatrixToAngleAxisAndTranslation(T *Rt, T *result) {
RotationMatrixToAngleAxis<T>(MatrixAdapter<const T, 4, 1>(Rt), result);
result[3] = Rt[3];
result[4] = Rt[7];
result[5] = Rt[11];
}
// At is a 6-dimensional vector with first three terms representing axis,
// magnitude angle, and the last three terms represent translation. Rt is a
// 4x3 transformation matrix of the form [R|t].
template <typename T> void AngleAxisAndTranslationToTransformationMatrix(const T *At, T *result) {
AngleAxisToRotationMatrix<T>(At, MatrixAdapter<T, 4, 1>(result));
result[3] = At[3];
result[7] = At[4];
result[11] = At[5];
}
#endif
|
Add utility functions for converting to and from AngleAxis
|
Add utility functions for converting to and from AngleAxis
|
C
|
mit
|
danielsuo/Cerberus,danielsuo/Cerberus
|
38310122f3a4d99326320da14638ff9088a33b56
|
src/source/libpetsc4py.c
|
src/source/libpetsc4py.c
|
/* ---------------------------------------------------------------- */
#include <Python.h>
/* ---------------------------------------------------------------- */
#define MPICH_SKIP_MPICXX 1
#define OMPI_SKIP_MPICXX 1
#include <petsc.h>
/* ---------------------------------------------------------------- */
#include "python_core.h"
#define PETSCMAT_DLL
#include "python_mat.c"
#undef PETSCMAT_DLL
#define PETSCKSP_DLL
#include "python_ksp.c"
#undef PETSCKSP_DLL
#define PETSCKSP_DLL
#include "python_pc.c"
#undef PETSCKSP_DLL
#define PETSCSNES_DLL
#include "python_snes.c"
#undef PETSCSNES_DLL
#define PETSCTS_DLL
#include "python_ts.c"
#undef PETSCTS_DLL
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#endif
/* ---------------------------------------------------------------- */
#define MPICH_SKIP_MPICXX 1
#define OMPI_SKIP_MPICXX 1
#include <petsc.h>
/* ---------------------------------------------------------------- */
#include "python_core.h"
#define PETSCMAT_DLL
#include "python_mat.c"
#undef PETSCMAT_DLL
#define PETSCKSP_DLL
#include "python_ksp.c"
#undef PETSCKSP_DLL
#define PETSCKSP_DLL
#include "python_pc.c"
#undef PETSCKSP_DLL
#define PETSCSNES_DLL
#include "python_snes.c"
#undef PETSCSNES_DLL
#define PETSCTS_DLL
#include "python_ts.c"
#undef PETSCTS_DLL
/* ---------------------------------------------------------------- */
|
Fix build failure with Python<=2.4 and PETSc<=3.1
|
Fix build failure with Python<=2.4 and PETSc<=3.1
|
C
|
bsd-2-clause
|
zonca/petsc4py,zonca/petsc4py,zonca/petsc4py,zonca/petsc4py
|
2b2f2991586e9aa843221f629df29596f8bfc6da
|
test/Frontend/dependency-generation-crash.c
|
test/Frontend/dependency-generation-crash.c
|
// RUN: not %clang_cc1 -E -dependency-file bla -MT %t/doesnotexist/bla.o -MP -o $t/doesnotexist/bla.o -x c /dev/null 2>&1 | FileCheck %s
// CHECK: error: unable to open output file
// rdar://9286457
|
// RUN: not %clang_cc1 -E -dependency-file bla -MT %t/doesnotexist/bla.o -MP -o %t/doesnotexist/bla.o -x c /dev/null 2>&1 | FileCheck %s
// CHECK: error: unable to open output file
// rdar://9286457
|
Fix typo in my last commit.
|
Fix typo in my last commit.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@231039 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
ffbfac16b089edc2ce0ff219bb6f8f8fc679f132
|
include/libport/detect-win32.h
|
include/libport/detect-win32.h
|
/*
* Copyright (C) 2008-2010, Gostai S.A.S.
*
* This software is provided "as is" without warranty of any kind,
* either expressed or implied, including but not limited to the
* implied warranties of fitness for a particular purpose.
*
* See the LICENSE file for more information.
*/
#ifndef LIBPORT_DETECT_WIN32_H
# define LIBPORT_DETECT_WIN32_H
# ifndef WIN32
# if defined LIBPORT_WIN32 || defined _MSC_VER
# define WIN32
# endif
# endif
# ifdef WIN32
// Normalize to 1
# undef WIN32
# define WIN32 1
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
# endif
# endif /* !WIN32 */
# ifdef WIN32
# define WIN32_IF(Then, Else) Then
# define EXEEXT ".exe"
# else
# define WIN32_IF(Then, Else) Else
# define EXEEXT ""
# endif
#endif // !LIBPORT_DETECT_WIN32_H
|
/*
* Copyright (C) 2008-2011, Gostai S.A.S.
*
* This software is provided "as is" without warranty of any kind,
* either expressed or implied, including but not limited to the
* implied warranties of fitness for a particular purpose.
*
* See the LICENSE file for more information.
*/
#ifndef LIBPORT_DETECT_WIN32_H
# define LIBPORT_DETECT_WIN32_H
# ifndef WIN32
# if defined LIBPORT_WIN32 || defined _MSC_VER
# define WIN32
# endif
# endif
# ifdef WIN32
// Normalize to 1
# undef WIN32
# define WIN32 1
# ifndef _WIN32_WINNT
// Boost 1.47 uses InitializeCriticalSectionAndSpinCount which is
// defined starting at 0x403
// (http://msdn.microsoft.com/en-us/library/windows/desktop/ms683476(v=vs.85).aspx).
# define _WIN32_WINNT 0x0403
# endif
# endif /* !WIN32 */
# ifdef WIN32
# define WIN32_IF(Then, Else) Then
# define EXEEXT ".exe"
# else
# define WIN32_IF(Then, Else) Else
# define EXEEXT ""
# endif
#endif // !LIBPORT_DETECT_WIN32_H
|
Boost 1.47 on Windows: require _WIN32_WINNT 0x0403.
|
Boost 1.47 on Windows: require _WIN32_WINNT 0x0403.
* include/libport/detect-win32.h: here.
|
C
|
bsd-3-clause
|
aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport,aldebaran/libport
|
1eb469e28be333e475b9b8b7c05d23c707ef2cad
|
Libs/PublicHeaders.h
|
Libs/PublicHeaders.h
|
//
// PublicHeaders.h
// Insider
//
// Created by Alexandru Maimescu on 3/2/16.
// Copyright © 2016 Alex Maimescu. All rights reserved.
//
#ifndef PublicHeaders_h
#define PublicHeaders_h
// GCDWebServer https://github.com/swisspol/GCDWebServer
#import <Insider/GCDWebServer.h>
#import <Insider/GCDWebServerURLEncodedFormRequest.h>
#import <Insider/GCDWebServerDataResponse.h>
// iOS-System-Services https://github.com/Shmoopi/iOS-System-Services
#import <Insider/SystemServices.h>
#endif /* PublicHeaders_h */
|
//
// PublicHeaders.h
// Insider
//
// Created by Alexandru Maimescu on 3/2/16.
// Copyright © 2016 Alex Maimescu. All rights reserved.
//
#ifndef PublicHeaders_h
#define PublicHeaders_h
// GCDWebServer https://github.com/swisspol/GCDWebServer
#import "GCDWebServer.h"
#import "GCDWebServerURLEncodedFormRequest.h"
#import "GCDWebServerDataResponse.h"
// iOS-System-Services https://github.com/Shmoopi/iOS-System-Services
#import "SystemServices.h"
#endif /* PublicHeaders_h */
|
Update imports in umbrella header.
|
Update imports in umbrella header.
|
C
|
mit
|
alexmx/Insider,alexmx/Insider,alexmx/Insider,alexmx/Insider,alexmx/Insider,alexmx/Insider
|
ad42abb933a1801721a5f0abe6bdb70bc8d70334
|
components/libc/compilers/newlib/libc.c
|
components/libc/compilers/newlib/libc.c
|
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2017/10/15 bernard the first version
*/
#include <rtthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/time.h>
#include "libc.h"
#ifdef RT_USING_PTHREADS
#include <pthread.h>
#endif
int _EXFUN(putenv,(char *__string));
int libc_system_init(void)
{
#if defined(RT_USING_DFS) & defined(RT_USING_DFS_DEVFS) & defined(RT_USING_CONSOLE)
rt_device_t dev_console;
dev_console = rt_console_get_device();
if (dev_console)
{
#if defined(RT_USING_POSIX)
libc_stdio_set_console(dev_console->parent.name, O_RDWR);
#else
libc_stdio_set_console(dev_console->parent.name, O_WRONLY);
#endif
}
#endif
/* set PATH and HOME */
putenv("PATH=/bin");
putenv("HOME=/home");
#if defined RT_USING_PTHREADS && !defined RT_USING_COMPONENTS_INIT
pthread_system_init();
#endif
return 0;
}
INIT_COMPONENT_EXPORT(libc_system_init);
|
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2017/10/15 bernard the first version
*/
#include <rtthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/time.h>
#include "libc.h"
#ifdef RT_USING_PTHREADS
#include <pthread.h>
#endif
int _EXFUN(putenv,(char *__string));
int libc_system_init(void)
{
#if defined(RT_USING_DFS) & defined(RT_USING_DFS_DEVFS) & defined(RT_USING_CONSOLE)
rt_device_t dev_console;
dev_console = rt_console_get_device();
if (dev_console)
{
#if defined(RT_USING_POSIX)
libc_stdio_set_console(dev_console->parent.name, O_RDWR);
#else
libc_stdio_set_console(dev_console->parent.name, O_WRONLY);
#endif
}
/* set PATH and HOME */
putenv("PATH=/bin");
putenv("HOME=/home");
#endif
#if defined RT_USING_PTHREADS && !defined RT_USING_COMPONENTS_INIT
pthread_system_init();
#endif
return 0;
}
INIT_COMPONENT_EXPORT(libc_system_init);
|
Disable ENV when disable DFS.
|
[Libc] Disable ENV when disable DFS.
|
C
|
apache-2.0
|
AubrCool/rt-thread,zhaojuntao/rt-thread,armink/rt-thread,hezlog/rt-thread,zhaojuntao/rt-thread,AubrCool/rt-thread,hezlog/rt-thread,weiyuliang/rt-thread,igou/rt-thread,igou/rt-thread,ArdaFu/rt-thread,armink/rt-thread,weety/rt-thread,zhaojuntao/rt-thread,FlyLu/rt-thread,nongxiaoming/rt-thread,RT-Thread/rt-thread,igou/rt-thread,armink/rt-thread,hezlog/rt-thread,hezlog/rt-thread,AubrCool/rt-thread,armink/rt-thread,FlyLu/rt-thread,wolfgangz2013/rt-thread,FlyLu/rt-thread,weiyuliang/rt-thread,weiyuliang/rt-thread,zhaojuntao/rt-thread,geniusgogo/rt-thread,nongxiaoming/rt-thread,RT-Thread/rt-thread,ArdaFu/rt-thread,gbcwbz/rt-thread,FlyLu/rt-thread,RT-Thread/rt-thread,weety/rt-thread,ArdaFu/rt-thread,zhaojuntao/rt-thread,nongxiaoming/rt-thread,geniusgogo/rt-thread,geniusgogo/rt-thread,armink/rt-thread,geniusgogo/rt-thread,FlyLu/rt-thread,igou/rt-thread,AubrCool/rt-thread,igou/rt-thread,wolfgangz2013/rt-thread,weety/rt-thread,nongxiaoming/rt-thread,weiyuliang/rt-thread,AubrCool/rt-thread,AubrCool/rt-thread,wolfgangz2013/rt-thread,geniusgogo/rt-thread,ArdaFu/rt-thread,ArdaFu/rt-thread,zhaojuntao/rt-thread,FlyLu/rt-thread,gbcwbz/rt-thread,wolfgangz2013/rt-thread,weiyuliang/rt-thread,ArdaFu/rt-thread,weety/rt-thread,gbcwbz/rt-thread,hezlog/rt-thread,gbcwbz/rt-thread,geniusgogo/rt-thread,RT-Thread/rt-thread,zhaojuntao/rt-thread,geniusgogo/rt-thread,wolfgangz2013/rt-thread,nongxiaoming/rt-thread,hezlog/rt-thread,nongxiaoming/rt-thread,AubrCool/rt-thread,armink/rt-thread,gbcwbz/rt-thread,weety/rt-thread,RT-Thread/rt-thread,weety/rt-thread,RT-Thread/rt-thread,nongxiaoming/rt-thread,weety/rt-thread,ArdaFu/rt-thread,gbcwbz/rt-thread,wolfgangz2013/rt-thread,wolfgangz2013/rt-thread,igou/rt-thread,armink/rt-thread,hezlog/rt-thread,weiyuliang/rt-thread,FlyLu/rt-thread,igou/rt-thread,weiyuliang/rt-thread,RT-Thread/rt-thread,gbcwbz/rt-thread
|
82fc0cb7883747942326d6d6ca1333b27bd647f0
|
test/Preprocessor/optimize.c
|
test/Preprocessor/optimize.c
|
// RUN: clang-cc -Eonly optimize.c -DOPT_O2 -O2 -verify &&
#ifdef OPT_O2
#ifndef __OPTIMIZE__
#error "__OPTIMIZE__ not defined"
#endif
#ifdef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ defined"
#endif
#endif
// RUN: clang-cc -Eonly optimize.c -DOPT_O0 -O0 -verify &&
#ifdef OPT_O0
#ifdef __OPTIMIZE__
#error "__OPTIMIZE__ defined"
#endif
#ifdef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ defined"
#endif
#endif
// RUN: clang-cc -Eonly optimize.c -DOPT_OS -Os -verify
#ifdef OPT_OS
#ifndef __OPTIMIZE__
#error "__OPTIMIZE__ not defined"
#endif
#ifndef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ not defined"
#endif
#endif
|
// RUN: clang-cc -Eonly %s -DOPT_O2 -O2 -verify &&
#ifdef OPT_O2
#ifndef __OPTIMIZE__
#error "__OPTIMIZE__ not defined"
#endif
#ifdef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ defined"
#endif
#endif
// RUN: clang-cc -Eonly %s -DOPT_O0 -O0 -verify &&
#ifdef OPT_O0
#ifdef __OPTIMIZE__
#error "__OPTIMIZE__ defined"
#endif
#ifdef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ defined"
#endif
#endif
// RUN: clang-cc -Eonly %s -DOPT_OS -Os -verify
#ifdef OPT_OS
#ifndef __OPTIMIZE__
#error "__OPTIMIZE__ not defined"
#endif
#ifndef __OPTIMIZE_SIZE
#error "__OPTIMIZE_SIZE__ not defined"
#endif
#endif
|
Use %s in test, not hard coded name.
|
Use %s in test, not hard coded name.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@68521 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-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
|
de93b2b6ea080ae28451ab9448e3628e55361dc2
|
src/safe_memory.c
|
src/safe_memory.c
|
#include "safe-c/safe_memory.h"
#include <stdio.h>
#include <string.h>
void* safe_malloc_function(size_t size, const char* calling_function)
{
if (size == 0)
{
fprintf(stderr, "Error allocating memory: The function %s called "
"'safe_malloc' and requested zero memory. The pointer should "
"be explicitly set to NULL instead.\n",
calling_function);
exit(EXIT_FAILURE);
}
void* memory = malloc(size);
if (!memory)
{
fprintf(stderr, "Error allocating memory: The function %s called "
"'safe_malloc' requesting %zu bytes of memory, but an error "
"occurred allocating this amount of memory. Exiting",
calling_function, size);
exit(EXIT_FAILURE);
}
memory = memset(memory, 0, size);
return memory;
}
void safe_free_function(void** pointer_address)
{
if (pointer_address != NULL)
{
free(*pointer_address);
*pointer_address = NULL;
}
}
|
#include "safe-c/safe_memory.h"
#include <stdio.h>
#include <string.h>
void* safe_malloc_function(size_t size, const char* calling_function)
{
if (size == 0)
{
fprintf(stderr, "Error allocating memory: The function %s called "
"'safe_malloc' and requested zero memory. The pointer should "
"be explicitly set to NULL instead.\n",
calling_function);
exit(EXIT_FAILURE);
}
void* memory = malloc(size);
if (!memory)
{
fprintf(stderr, "Error allocating memory: The function %s called "
"'safe_malloc' requesting %zu bytes of memory, but an error "
"occurred allocating this amount of memory.\n",
calling_function, size);
exit(EXIT_FAILURE);
}
memory = memset(memory, 0, size);
return memory;
}
void safe_free_function(void** pointer_address)
{
if (pointer_address != NULL)
{
free(*pointer_address);
*pointer_address = NULL;
}
}
|
Add newline to error message in safe_malloc.
|
Add newline to error message in safe_malloc.
The message that is printed when safe_malloc fails to allocate memory was missing a newline character.
|
C
|
mit
|
VanJanssen/safe-c,VanJanssen/elegan-c,ErwinJanssen/elegan-c
|
b9be70ddceebc4b6a9eff29a72bd680e10e091c7
|
src/file/file_default.h
|
src/file/file_default.h
|
/*
* This file is part of libbdplus
* Copyright (C) 2015 VideoLAN
*
* 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/>.
*/
#ifndef FILE_DEFAULT_H_
#define FILE_DEFAULT_H_
#include "filesystem.h"
#include "util/attributes.h"
BD_PRIVATE BDPLUS_FILE_H *file_open_default(void *root_path, const char *file_name);
#endif /* FILE_DEFAULT_H_ */
|
/*
* This file is part of libbdplus
* Copyright (C) 2015 VideoLAN
*
* 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/>.
*/
#ifndef FILE_DEFAULT_H_
#define FILE_DEFAULT_H_
#include "util/attributes.h"
struct bdplus_file;
BD_PRIVATE struct bdplus_file *file_open_default(void *root_path, const char *file_name);
#endif /* FILE_DEFAULT_H_ */
|
Replace include with forward declaration
|
Replace include with forward declaration
|
C
|
lgpl-2.1
|
ShiftMediaProject/libbdplus,ShiftMediaProject/libbdplus,ShiftMediaProject/libbdplus
|
e05b052ebf4b8ed48b8dc5f0e358c2c01aabda78
|
Wangscape/noise/module/codecs/ModuleCodecs.h
|
Wangscape/noise/module/codecs/ModuleCodecs.h
|
#pragma once
#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CurveWrapperCodec.h"
#include "CylindersWrapperCodec.h"
#include "DisplaceWrapperCodec.h"
#include "ExponentWrapperCodec.h"
#include "InvertWrapperCodec.h"
#include "MaxWrapperCodec.h"
#include "MinWrapperCodec.h"
#include "MultiplyWrapperCodec.h"
#include "NoiseSourcesCodec.h"
#include "PerlinWrapperCodec.h"
#include "PowerWrapperCodec.h"
#include "RidgedMultiWrapperCodec.h"
#include "RotatePointWrapperCodec.h"
#include "ScaleBiasWrapperCodec.h"
#include "ScalePointCodec.h"
#include "SelectWrapperCodec.h"
#include "SpheresWrapperCodec.h"
#include "TerraceWrapperCodec.h"
#include "TranslatePointWrapperCodec.h"
#include "TurbulenceWrapperCodec.h"
#include "VoronoiWrapperCodec.h"
|
#pragma once
#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CornerCombinerBaseWrapperCodec.h"
#include "CurveWrapperCodec.h"
#include "CylindersWrapperCodec.h"
#include "DisplaceWrapperCodec.h"
#include "ExpWrapperCodec.h"
#include "ExponentWrapperCodec.h"
#include "ForwardWrapperCodec.h"
#include "InvertWrapperCodec.h"
#include "MaxWrapperCodec.h"
#include "MinWrapperCodec.h"
#include "MultiplyWrapperCodec.h"
#include "NormLPQWrapperCodec.h"
#include "NoiseSourcesCodec.h"
#include "PerlinWrapperCodec.h"
#include "PowWrapperCodec.h"
#include "PowerWrapperCodec.h"
#include "RidgedMultiWrapperCodec.h"
#include "RotatePointWrapperCodec.h"
#include "ScaleBiasWrapperCodec.h"
#include "ScalePointCodec.h"
#include "SelectWrapperCodec.h"
#include "SpheresWrapperCodec.h"
#include "TerraceWrapperCodec.h"
#include "TranslatePointWrapperCodec.h"
#include "TurbulenceWrapperCodec.h"
#include "VoronoiWrapperCodec.h"
|
Put new codecs in module codec header
|
Put new codecs in module codec header
|
C
|
mit
|
serin-delaunay/Wangscape,serin-delaunay/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape,Wangscape/Wangscape
|
8cb37afde89b4c89079f579f3532792d7dd5ff67
|
src/http/responsedata.h
|
src/http/responsedata.h
|
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H
#include <string>
namespace ApiMock {
struct ResponseData {
std::string body;
};
}
#endif
|
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H
#include <string>
#include <unordered_map>
#include "statuscodes.h"
namespace ApiMock {
struct ResponseData {
std::string body;
std::unordered_map<std::string, std::string> headers;
HTTP_RESPONSE_CODE statusCode;
};
}
#endif
|
Add headers and status code to response
|
Add headers and status code to response
|
C
|
mit
|
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
|
17ceee99c3b3170a49b5fca7f7650f94f40e1de9
|
Pod/Classes/Artsy+Authentication.h
|
Pod/Classes/Artsy+Authentication.h
|
#import "ArtsyToken.h"
#import "ArtsyAuthentication.h"
#import "ArtsyAuthentication+Facebook.h"
#import "ArtsyAuthentication+Twitter.h"
|
#import "ArtsyToken.h"
#import "ArtsyAuthentication.h"
#if __has_include("ArtsyAuthentication+Facebook.h")
#import "ArtsyAuthentication+Facebook.h"
#endif
#if __has_include("ArtsyAuthentication+Twitter.h")
#import "ArtsyAuthentication+Twitter.h"
#endif
|
Use if includes for fb/tiwtter
|
Use if includes for fb/tiwtter
|
C
|
mit
|
artsy/Artsy_Authentication,artsy/Artsy-Authentication,artsy/Artsy-Authentication,artsy/Artsy-Authentication
|
738eddb1c30571adf27544bda80709b15ace587e
|
You-DataStore/datastore.h
|
You-DataStore/datastore.h
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static boost::variant<bool, SerializedTask> get(TaskId);
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& get();
bool isServing = false;
std::deque<Internal::IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static std::vector<SerializedTask> getAllTask();
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& get();
bool isServing = false;
std::deque<Internal::IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
Rename get(TaskId) to getAllTask (QueryEngine does not need it)
|
Rename get(TaskId) to getAllTask (QueryEngine does not need it)
|
C
|
mit
|
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
|
065a075e17671be38341202bff5852a04f086548
|
00-HelloWorld/bind.c
|
00-HelloWorld/bind.c
|
#include "libmypy.h"
char hellofunc_docs[] = "Hello world description.";
PyMethodDef helloworld_funcs[] = {
{ "hello",
(PyCFunction)hello,
METH_NOARGS,
hellofunc_docs},
{ NULL}
};
struct PyModuleDef helloworld_mod = {
PyModuleDef_HEAD_INIT,
"helloworld",
"This is hello world module.",
-1,
helloworld_funcs,
NULL,
NULL,
NULL,
NULL
};
void PyInit_helloworld(void) {
PyModule_Create(&helloworld_mod);
}
|
#include "libmypy.h"
char hellofunc_docs[] = "Hello world description.";
PyMethodDef helloworld_funcs[] = {
{ "hello",
(PyCFunction)hello,
METH_NOARGS,
hellofunc_docs},
{ NULL}
};
char helloworldmod_docs[] = "This is hello world module.";
PyModuleDef helloworld_mod = {
PyModuleDef_HEAD_INIT,
"helloworld",
helloworldmod_docs,
-1,
helloworld_funcs,
NULL,
NULL,
NULL,
NULL
};
void PyInit_helloworld(void) {
PyModule_Create(&helloworld_mod);
}
|
Make the codes in the order.
|
Make the codes in the order.
|
C
|
bsd-3-clause
|
starnight/python-c-extension,starnight/python-c-extension,starnight/python-c-extension
|
6f36fc3e94f81897a5780cbe943deb6af002a3c5
|
texor.c
|
texor.c
|
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag |= (CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q') {
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
}
return 0;
}
|
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag |= (CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
raw.c_cc[VMIN] = 0;
raw.c_cc[VTIME] = 1;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
while (1) {
char c = '\0';
read(STDIN_FILENO, &c, 1);
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
if (c == 'q') break;
}
return 0;
}
|
Add a timeout for read
|
Add a timeout for read
|
C
|
bsd-2-clause
|
kyletolle/texor
|
3d66f211250ccae47fdbc6259b22605cd14464c7
|
include/Genes/Mutation_Rate_Gene.h
|
include/Genes/Mutation_Rate_Gene.h
|
#ifndef MUTATION_RATE_GENE_H
#define MUTATION_RATE_GENE_H
#include "Gene.h"
#include <string>
#include <memory>
#include <map>
#include "Game/Color.h"
//! The gene controls how much of the genome mutates per Genome::mutate() event.
class Mutation_Rate_Gene : public Gene
{
public:
std::string name() const noexcept override;
//! Controls how many changes a call to Genome::mutate() makes to the Gene collections.
//
//! \returns An integer number that determines the number of point mutations the Genome::mutate() makes.
int mutation_count() const noexcept;
void gene_specific_mutation() noexcept override;
std::unique_ptr<Gene> duplicate() const noexcept override;
protected:
std::map<std::string, double> list_properties() const noexcept override;
void load_properties(const std::map<std::string, double>& properties) override;
private:
double mutated_components_per_mutation = 100.0;
double score_board(const Board& board, Color perspective, size_t prior_real_moves) const noexcept override;
};
#endif // MUTATION_RATE_GENE_H
|
#ifndef MUTATION_RATE_GENE_H
#define MUTATION_RATE_GENE_H
#include "Gene.h"
#include <string>
#include <memory>
#include <map>
#include "Game/Color.h"
//! The gene controls how much of the genome mutates per Genome::mutate() event.
class Mutation_Rate_Gene : public Gene
{
public:
std::string name() const noexcept override;
//! Controls how many changes a call to Genome::mutate() makes to the Gene collections.
//
//! \returns An integer number that determines the number of point mutations the Genome::mutate() makes.
int mutation_count() const noexcept;
void gene_specific_mutation() noexcept override;
std::unique_ptr<Gene> duplicate() const noexcept override;
protected:
std::map<std::string, double> list_properties() const noexcept override;
void load_properties(const std::map<std::string, double>& properties) override;
private:
double mutated_components_per_mutation = 1.0;
double score_board(const Board& board, Color perspective, size_t prior_real_moves) const noexcept override;
};
#endif // MUTATION_RATE_GENE_H
|
Reduce initial number of mutations
|
Reduce initial number of mutations
|
C
|
mit
|
MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess
|
f825cd3d1f4dc05d7124ad00177c37d0f6b9a4d0
|
yamiHikariGame/Classes/Constants.h
|
yamiHikariGame/Classes/Constants.h
|
//
// Constants.h
// yamiHikariGame
//
// Created by slightair on 2013/07/28.
//
//
#ifndef yamiHikariGame_Constants_h
#define yamiHikariGame_Constants_h
#define SpriteSheetImageFileName "spriteSheet.pvr.ccz"
#define DefaultFontName "mosamosa"
#define DefaultFontSize 24
#define StaminaMax 1000
#define SEItemGet "SE001.mp3"
#define SEGameOver "SE002.mp3"
#define SEBadItemGet "SE004.mp3"
#define SoundEffectVolume 0.15
#endif
|
//
// Constants.h
// yamiHikariGame
//
// Created by slightair on 2013/07/28.
//
//
#ifndef yamiHikariGame_Constants_h
#define yamiHikariGame_Constants_h
#define SpriteSheetImageFileName "spriteSheet.pvr.ccz"
#define DefaultFontName "mosamosa.ttf"
#define DefaultFontSize 24
#define StaminaMax 1000
#define SEItemGet "SE001.mp3"
#define SEGameOver "SE002.mp3"
#define SEBadItemGet "SE004.mp3"
#define SoundEffectVolume 0.15
#endif
|
Fix to Use specified Font mosamosa.
|
Fix to Use specified Font mosamosa.
|
C
|
mit
|
slightair/yamiHikariGame,slightair/yamiHikariGame,slightair/yamiHikariGame,slightair/yamiHikariGame,slightair/yamiHikariGame
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.