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 |
|---|---|---|---|---|---|---|---|---|---|
0bc5dac3db25de42dfd86cfd7c3e4cc33587d8f3 | src/client/crypt.c | src/client/crypt.c | #include <openssl/aes.h>
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>
#include "crypt.h"
typedef unsigned char aes_t;
void generate_bytes(aes_t *buf) {
if (!RAND_bytes(buf, sizeof(buf))) {
fprintf(stderr, "[!] Could not generate key");
}
}
aes_t *encrypt(char *plaintext, aes_t *k... | #include <openssl/aes.h>
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>
#include "crypt.h"
typedef unsigned char aes_t;
void generate_bytes(aes_t *buf) {
if (!RAND_bytes(buf, sizeof(buf))) {
fprintf(stderr, "[!] Could not generate key");
}
}
aes_t *encrypt(char *plaintext, aes_t *k... | Use strlen instead of sizeof | Use strlen instead of sizeof
| C | mit | ThisIsMyNick/CChat,ThisIsMyNick/CChat |
9aa854c9ff8be24d6d16404b591f9a5b2e2e5237 | priv/qfappscriptdispatcherwrapper.h | priv/qfappscriptdispatcherwrapper.h | #ifndef QFAPPSCRIPTDISPATCHERWRAPPER_H
#define QFAPPSCRIPTDISPATCHERWRAPPER_H
#include <QQuickItem>
#include <QPointer>
#include "qfappdispatcher.h"
class QFAppScriptDispatcherWrapper : public QQuickItem
{
Q_OBJECT
public:
QFAppScriptDispatcherWrapper();
QString type() const;
void setType(const QStri... | #ifndef QFAPPSCRIPTDISPATCHERWRAPPER_H
#define QFAPPSCRIPTDISPATCHERWRAPPER_H
#include <QQuickItem>
#include <QPointer>
#include "qfappdispatcher.h"
class QFAppScriptDispatcherWrapper : public QObject
{
Q_OBJECT
public:
QFAppScriptDispatcherWrapper();
QString type() const;
void setType(const QString ... | Change parent of QFAppScriptDispatcherWrapper from QQuickItem to QObject | Change parent of QFAppScriptDispatcherWrapper from QQuickItem to QObject
| C | apache-2.0 | benlau/quickflux,benlau/quickflux |
1505139f741e601408dc4aaddf8e352d28085f00 | test/Driver/offloading-interoperability.c | test/Driver/offloading-interoperability.c | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | ... | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | ... | Allow .exe extension to ld to fix test with mingw. | Allow .exe extension to ld to fix test with mingw.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277334 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
5446062ac8d33adda2927d122e7fe4e7052c2666 | sys/pc98/include/param.h | sys/pc98/include/param.h | /*-
* This file is in the public domain.
*/
/* $FreeBSD$ */
#include <i386/param.h>
| /*-
* Copyright (c) 2005 TAKAHASHI Yoshihiro.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list o... | Switch MACHINE to "pc98" on FreeBSD/pc98. Add copyright. | Switch MACHINE to "pc98" on FreeBSD/pc98.
Add copyright.
Approved by: FreeBSD/pc98 development team.
| 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 |
617ff31664d7aaaf391272da30d3ae65d0426df7 | test/Analysis/array-struct.c | test/Analysis/array-struct.c | // RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
... | // RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
... | Add test cast for struct array. | Add test cast for struct array.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59522 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
f49f7674b9ec11b777b0954ea9fa0fe73a7ad4be | RobotC/Headers/Helper.h | RobotC/Headers/Helper.h | #ifndef HELPER_H
#define HELPER_H
/*Helper function for calculating ABSOLUTE maximum of two floats
Will return maximum absolute value (ignores sign) */
float helpFindMaxAbsFloat(float a, float b) {
float aAbs = abs(a);
float bAbs = abs(b);
if (aAbs > bAbs) {
return aAbs;
} else {
return bAbs;
}
}
//Helper ... | #ifndef HELPER_H
#define HELPER_H
/*Helper function for calculating ABSOLUTE maximum of two floats
Will return maximum absolute value (ignores sign) */
float helpFindMaxAbsFloat(float a, float b) {
float aAbs = abs(a);
float bAbs = abs(b);
if (aAbs > bAbs) {
return aAbs;
} else {
return bAbs;
}
}
//Helper ... | Fix helpFindSign (floats don't have signs....) | Fix helpFindSign (floats don't have signs....)
| C | mit | RMRobotics/FTC_5421_2014-2015,RMRobotics/FTC_5421_2014-2015 |
0d06b78d10a5648560158f958973f9e07edd194b | swap.c | swap.c | #include <stdio.h>
#define SWAP(x, y) { \
typeof (x) tmp = y; \
y = x; \
x = tmp; \
}
int main() {
int a = 1;
int b = 2;
SWAP(a, b);
printf("a: %d, b: %d\n", a, b);
return 0;
}
| #include <stdio.h>
#define SWAP(x, y) { \
typeof (x) tmp = y; \
y = x; \
x = tmp; \
}
int main() {
int a = 1;
int b = 2;
SWAP(a, b);
printf("a: %d, b: %d\n", a, b);
float arr[2] = {3.0, 4.0};
SWAP(arr[0], arr[1]);
printf("arr[0]: ... | Test we work with other, more complex types. | Test we work with other, more complex types.
| C | mit | Wilfred/comparative_macrology,Wilfred/comparative_macrology,Wilfred/comparative_macrology,Wilfred/comparative_macrology |
cf45dd1238806c0a9ff74043694f5d276efc7f4a | phase-01/main.c | phase-01/main.c | /**
* Phase 01 - Get a Window that works and can be closed.
*
* This code won't be structured very well, just trying to get stuff working.
*/
#include <stdlib.h>
int main(int argc, char *argv[])
{
return EXIT_SUCCESS;
}
| /**
* Phase 01 - Get a Window that works and can be closed.
*
* This code won't be structured very well, just trying to get stuff working.
*/
#include <stdlib.h>
#include <X11/Xlib.h>
int main(int argc, char *argv[])
{
Display *dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
return EXIT_FAILURE;
}
XClos... | Create the display, free it at the end, exit with failure if the display doesn't open | Create the display, free it at the end, exit with failure if the display doesn't open
| C | mit | Faison/xlib-learning |
af533b7e864c9a3790abe2095110924cc374af3c | DocFormats/DFTypes.h | DocFormats/DFTypes.h | // Copyright 2012-2014 UX Productivity Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ... | // Copyright 2012-2014 UX Productivity Pty Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ... | Disable warnings about insecure functions | Win32: Disable warnings about insecure functions
Set the _CRT_SECURE_NO_WARNINGS macro so that VC++ doesn't complain
about commonly-used functions like open and vsnprintf that it considers
"unsafe". The alternatives it suggests are not available on Unix-based
platforms, and they're used extensively throughout the code... | C | apache-2.0 | apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,corinthia/corinthia-docformats,corinthia/corinthia-docformats,apa... |
991fa7648b54c6d03bfe0d112a37d17dd2054d52 | test_utils/mock_queue.h | test_utils/mock_queue.h | #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const ... | #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const ... | Fix issue with mock method. | Fix issue with mock method.
| C | mit | djpetti/gaia,djpetti/gaia,djpetti/gaia |
21ae225c5b7e15ef2ea46608f8cb4d9b8777a9cf | test2/initialisation/struct/empty/init.c | test2/initialisation/struct/empty/init.c | // RUN: %layout_check %s
// RUN: %check %s
struct A
{
}; // CHEKC: /warning: empty struct/
struct Containter
{
struct A a;
};
struct Pre
{
int i;
struct A a;
int j;
};
struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/
struct Pre q = { 1, {}, 2 };
main()
{
struct ... | // RUN: %layout_check %s
// RUN: %check %s
struct A
{
}; // CHECK: /warning: empty struct/
struct Container
{
struct A a;
};
struct Pre
{
int i;
struct A a;
int j;
};
struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/
struct Pre q = { 1, {}, 2 };
main()
{
struct A... | Fix typo in empty struct test check | Fix typo in empty struct test check
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
9e95e999cf87215b33d0b5b203b4a3cd0381a368 | verilog/tools/kythe/kythe_proto_output.h | verilog/tools/kythe/kythe_proto_output.h | // Copyright 2017-2020 The Verible 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 o... | // Copyright 2017-2020 The Verible 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 o... | Remove unnecessary default constructor from KytheProtoOutput | [kythe] Remove unnecessary default constructor from KytheProtoOutput
| C | apache-2.0 | chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible |
3a999bf6de5a6c4963f448c5498cd2c9c488d1a0 | temperature.c | temperature.c | // Copyright 2016, Jeffrey E. Bedard
#include "temperature.h"
#include "config.h"
#include "font.h"
#include "util.h"
#include <stdio.h>
#include <string.h>
// Returns x offset for next item
uint16_t draw_temp(xcb_connection_t * xc, const uint16_t offset)
{
const uint8_t v
= xstatus_system_value(XSTATUS_SYSFILE_TEMP... | // Copyright 2016, Jeffrey E. Bedard
#include "temperature.h"
#include "config.h"
#include "font.h"
#include "util.h"
#include <stdio.h>
static uint16_t get_offset(const uint16_t fw, const uint16_t offset,
const uint8_t len)
{
return fw * len + offset + XSTATUS_CONST_WIDE_PAD
+ XSTATUS_CONST_PAD;
}
// Returns x off... | Split out get_offset(). Eliminated unnecessary call to strlen(). | Split out get_offset(). Eliminated unnecessary call to strlen().
| C | mit | jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus |
1c0969525f2500603fbb9f2360fbda3439831003 | thingshub/CDZThingsHubErrorDomain.h | thingshub/CDZThingsHubErrorDomain.h | //
// CDZThingsHubErrorDomain.h
// thingshub
//
// Created by Chris Dzombak on 1/14/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
#import "CDZThingsHubApplication.h"
extern NSString * const kThingsHubErrorDomain;
typedef NS_ENUM(NSInteger, CDZErrorCode) {
CDZErrorCodeConfigurationValidatio... | //
// CDZThingsHubErrorDomain.h
// thingshub
//
// Created by Chris Dzombak on 1/14/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
#import "CDZThingsHubApplication.h"
extern NSString * const kThingsHubErrorDomain;
typedef NS_ENUM(NSInteger, CDZErrorCode) {
CDZErrorCodeTestError = 0,
CDZ... | Make error domain constants mirror app return codes | Make error domain constants mirror app return codes | C | mit | cdzombak/thingshub,cdzombak/thingshub,cdzombak/thingshub |
d01500c7ed2b6445d37176a05c911f25a299f38a | Pod/Classes/Private/IRLSizePrivate.h | Pod/Classes/Private/IRLSizePrivate.h | //
// IRLSizePrivate.h
// IRLSize
//
// Created by Jeff Kelley on 6/29/16.
// Copyright © 2016 Detroit Labs. All rights reserved.
//
#ifndef IRLSizePrivate_h
#define IRLSizePrivate_h
typedef float RawLengthMeasurement; // meters
typedef struct {
RawLengthMeasurement width;
RawLengthMeasurement height;
} ... | //
// IRLSizePrivate.h
// IRLSize
//
// Created by Jeff Kelley on 6/29/16.
// Copyright © 2016 Detroit Labs. All rights reserved.
//
#ifndef IRLSizePrivate_h
#define IRLSizePrivate_h
typedef float RawLengthMeasurement; // meters
typedef struct {
RawLengthMeasurement width;
RawLengthMeasurement height;
} ... | Use the class property instead of getter method | Use the class property instead of getter method | C | mit | detroit-labs/IRLSize,detroit-labs/IRLSize,detroit-labs/IRLSize |
ad18456cbcd2a498a259eaefa98d77263a5eebb5 | src/gdomdebug.c | src/gdomdebug.c | #include <gdomdebug.h>
#include <glib/gprintf.h>
static gboolean debug_enabled = FALSE;
void
gdom_debug (char const *format, ...)
{
va_list args;
if (!debug_enabled)
return;
va_start (args, format);
g_vprintf (format, args);
g_printf ("\n");
va_end (args);
}
void
gdom_debug_enable (void)
{
debug_enabled =... | #include <gdomdebug.h>
#include <glib/gprintf.h>
#include <stdlib.h>
static gboolean debug_checked = FALSE;
static gboolean debug_enabled = FALSE;
static gboolean
_is_debug_enabled ()
{
const char *debug_var;
if (debug_checked)
return debug_enabled;
debug_var = g_getenv ("GMATHML_DEBUG");
debug_enabled = deb... | Allow debug messages using GMATHML_DEBUG environment variable. | [debug] Allow debug messages using GMATHML_DEBUG environment variable.
| C | lgpl-2.1 | wavewave/lasem,gjtorikian/lasem,janmarthedal/mathml2svg,wavewave/lasem,gjtorikian/lasem,wavewave/lasem,janmarthedal/mathml2svg,wavewave/lasem,gjtorikian/lasem,janmarthedal/mathml2svg,gjtorikian/lasem,janmarthedal/mathml2svg |
982c1323303be930ecafb072c7075de0319dd48c | src/starlight.h | src/starlight.h | #pragma once
#include <string>
#if 0
int Stricmp(const char* str1, const char* str2) {
int d;
while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) {
str1++;
str2++;
}
return d;
}
int Strnicmp(const char* str1, const char* str2, int count) {
int d = 0;
while (count > 0 && (d = toupper(*str2) - toupper... | #pragma once
#include <string>
#if 0
int Stricmp(const char* str1, const char* str2) {
int d;
while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) {
str1++;
str2++;
}
return d;
}
int Strnicmp(const char* str1, const char* str2, int count) {
int d = 0;
while (count > 0 && (d = toupper(*str2) - toupper... | Add space between date and time | Add space between date and time
| C | mit | darkedge/starlight,darkedge/starlight,darkedge/starlight |
d9ee51a1ce04dfe0db1f89c34aa21ebc408ad869 | input.c | input.c | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"exit",
"quit",
};
... | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"exit",
"quit",
"b... | Add bye to exit words | Add bye to exit words
| C | mit | Roadagain/Calculator,Roadagain/Calculator |
0872c7be8541e059241d0bbe89a442a8c4b90215 | Include/genobject.h | Include/genobject.h |
/* Generator object interface */
#ifndef Py_LIMITED_API
#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
struct _frame; /* Avoid including frameobject.h */
typedef struct {
PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
/* Note: gi_fr... |
/* Generator object interface */
#ifndef Py_LIMITED_API
#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
struct _frame; /* Avoid including frameobject.h */
typedef struct {
PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
/* Note: gi_fr... | Fix regression after c8d1df9ac987 (PPC buildbot) | Fix regression after c8d1df9ac987
(PPC buildbot)
| C | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator |
c2475f236c7da439da5acc27114a92ae9ffe5ef4 | LYCategory/Classes/_UIKit/UIColor+Speed.h | LYCategory/Classes/_UIKit/UIColor+Speed.h | //
// UIColor+Speed.h
// LYCategory
//
// CREATED BY LUO YU ON 26/10/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface UIColor (Speed)
- (UIColor *)colorWithR:(CGFloat)redValue G:(CGFloat)greenValue B:(CGFloat)blueValue;
@end
| //
// UIColor+Speed.h
// LYCategory
//
// CREATED BY LUO YU ON 26/10/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface UIColor (Speed)
/**
generate color object with red-green-blue values
@param redValue red color value, 0~255
@param greenValue green color value, 0~... | Modify : doc for color | Modify : doc for color
| C | mit | blodely/LYCategory,blodely/LYCategory,blodely/LYCategory,blodely/LYCategory |
a2a0e6f33f8b84f80a558c382214378fa156ecee | findbarcode.c | findbarcode.c | #include <stdio.h>
#include "stb_image.c"
#define FILENAME "wikipedia_barcode.png"
int main(int argc, char **argv)
{
int width, height, bytes_per_pixel;
unsigned char *data = stbi_load(FILENAME, &width, &height, &bytes_per_pixel, STBI_default);
if (data) {
// Run through every pixel and print its greyscal... | #include <stdio.h>
#include "stb_image.c"
#define FILENAME "wikipedia_barcode.png"
int main(int argc, char **argv)
{
int width, height, bytes_per_pixel;
unsigned char *data = stbi_load(FILENAME, &width, &height, &bytes_per_pixel, STBI_default);
if (data) {
// Run through every pixel and print its greyscal... | Print grey pixel value as unsigned | Print grey pixel value as unsigned
| C | mit | jakeboxer/findbarcode |
2c1b1a2343f5882ee6f98328ff391478d0d58c23 | src/3rdparty/win32_src/pdcurses/wincon/pdcwin.h | src/3rdparty/win32_src/pdcurses/wincon/pdcwin.h | /* PDCurses */
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(PDC_WIDE) && !defined(... | /* PDCurses */
#ifndef __PDC_WIN_H__
#define __PDC_WIN_H__
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings ... | Add include guard to fix wincon compile. | Add include guard to fix wincon compile.
| C | bsd-3-clause | clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube |
0f034d699c77ae4c7c989bf41405ff1b433e37ca | core/base/inc/LinkDef.h | core/base/inc/LinkDef.h | #include "core/base/inc/LinkDef1.h"
#include "core/base/inc/LinkDef2.h"
#include "core/base/inc/LinkDef3.h"
#include "core/clib/inc/LinkDef.h"
#include "core/cont/inc/LinkDef.h"
#include "core/meta/inc/LinkDef.h"
#include "core/metautils/inc/LinkDef.h"
#include "core/textinput/inc/LinkDef.h"
#include "core/zip/inc/Link... | #include "core/base/inc/LinkDef1.h"
#include "core/base/inc/LinkDef2.h"
#include "core/base/inc/LinkDef3.h"
#include "core/clib/inc/LinkDef.h"
#include "core/cont/inc/LinkDef.h"
#include "core/meta/inc/LinkDef.h"
#include "core/metautils/inc/LinkDef.h"
#include "core/textinput/inc/LinkDef.h"
#include "core/zip/inc/Link... | Verify that one of SYSTEM_TYPE_... is set. | Verify that one of SYSTEM_TYPE_... is set.
| C | lgpl-2.1 | agarciamontoro/root,abhinavmoudgil95/root,abhinavmoudgil95/root,buuck/root,beniz/root,BerserkerTroll/root,BerserkerTroll/root,beniz/root,beniz/root,davidlt/root,simonpf/root,agarciamontoro/root,gganis/root,davidlt/root,karies/root,olifre/root,zzxuanyuan/root-compressor-dummy,simonpf/root,gbitzes/root,BerserkerTroll/roo... |
c28b765893ed505ac62864c9d4ce67cd4f9b9fc0 | include/bl2/bl2.h | include/bl2/bl2.h | /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BL2_H__
#define BL2_H__
struct entry_point_info;
void bl2_main(void);
struct entry_point_info *bl2_load_images(void);
#endif /* BL2_H__ */
| /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BL2_H__
#define BL2_H__
void bl2_main(void);
#endif /* BL2_H__ */
| Fix MISRA rule 8.5 in common code | Fix MISRA rule 8.5 in common code
Rule 8.5: An external object or function shall be declared
once in one and only one file.
Change-Id: I7c3d4ec7d3ba763fdb4600008ba10b4b93ecdfce
Signed-off-by: Roberto Vargas <d75e640c49defb97bd074f828210df57ed181e1f@arm.com>
| C | bsd-3-clause | achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware |
4575d0a769a4b85012bd82f328038a80555917bd | config.h | config.h | #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE \
256
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE \
512
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| Increase read and write buffer size per peer. | Increase read and write buffer size per peer.
| C | mit | mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet |
04c226aab970da86fc9f59ec3a808cf916458261 | test/CodeGen/arm-neon-fma.c | test/CodeGen/arm-neon-fma.c | // REQUIRES: arm-registered-target
// RUN: %clang -target thumbv7-none-linux-gnueabihf \
// RUN: -mcpu=cortex-a8 -mfloat-abi=hard \
// RUN: -O3 -S -emit-llvm -o - %s | FileCheck %s
#include <arm_neon.h>
float32x2_t test_fma_order(float32x2_t accum, float32x2_t lhs, float32x2_t rhs) {
return vfma_f32(accum, lhs,... | // REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-none-linux-gnueabihf \
// RUN: -target-abi aapcs \
// RUN: -target-cpu cortex-a8 \
// RUN: -mfloat-abi hard \
// RUN: -ffreestanding \
// RUN: -O3 -S -emit-llvm -o - %s | FileCheck %s
#include <arm_neon.h>
float32x2_t test_fma_order(float... | Fix recent test for more diverse environments. | Fix recent test for more diverse environments.
I think the main issue was the lack of -ffreestanding, which pulled in
the host's stdint.h. After that things went rapidly downhill.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@172653 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
b288888c9a5546844c146d8b7161d24ebbd7c7f7 | tests/testutils.h | tests/testutils.h | #ifndef _TESTUTILS_H
#define _TESTUTILS_H
/*
* tslib/tests/testutils.h
*
* Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org>
*
* This file is placed under the LGPL.
*
*
* Misc utils for ts test programs
*/
#define RESET "\033[0m"
#define RED "\033[31m"
#define GREEN "\033[32m"
#define B... | #ifndef _TESTUTILS_H
#define _TESTUTILS_H
/*
* tslib/tests/testutils.h
*
* Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org>
*
* This file is placed under the GPL.
*
* SPDX-License-Identifier: GPL-2.0+
*
*
* Misc utils for ts test programs
*/
#define RESET "\033[0m"
#define RED "\033[31... | Fix license statement in header comment and add SPDS identifier | tests: Fix license statement in header comment and add SPDS identifier
This file had been copied around a long time ago, and included a wrong
license. All files in the tests directory (except for this small header)
are GPL licensed.
I actually doubt that the copyright notice is accurate here -.-
Signed-off-by: Marti... | C | lgpl-2.1 | kergoth/tslib,kergoth/tslib,kergoth/tslib,kergoth/tslib |
b1e1910a974865a362546d7d4bee35becb69b5e2 | src/condor_syscall_lib/scanner.h | src/condor_syscall_lib/scanner.h | #define FUNC 1
#define PARAM 2
#define PTR_PARAM 3
struct token {
int tok_type;
char *val;
};
struct node {
int node_type;
char *type_name;
char *id;
int is_ptr;
int is_const;
int is_mapped;
int is_array;
int extract;
struct node *next;
struct node *prev;
};
union yystype {
struct token tok;
... | #define FUNC 1
#define PARAM 2
#define PTR_PARAM 3
struct token {
int tok_type;
char *val;
};
struct node {
int node_type;
char *type_name;
char *id;
int is_ptr;
int is_const;
int is_const_ptr;
int is_mapped;
int is_array;
int in_param;
int out_param;
int extract;
struct node *next;
struct ... | Add boolean type so yacc productions can return a boolean value. Add parameter mode type so we can tag parameters as IN, OUT, or BOTH. | Add boolean type so yacc productions can return a boolean value.
Add parameter mode type so we can tag parameters as IN, OUT, or BOTH.
| C | apache-2.0 | htcondor/htcondor,djw8605/condor,htcondor/htcondor,htcondor/htcondor,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,bbockelm/... |
e501b91a4a8f680ed453a6ad372f07d0836ab42b | Core/Code/Testing/mitkRenderingTestHelper.h | Core/Code/Testing/mitkRenderingTestHelper.h | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | Fix linker warnings in rendering tests | Fix linker warnings in rendering tests
| C | bsd-3-clause | nocnokneo/MITK,danielknorr/MITK,iwegner/MITK,NifTK/MITK,danielknorr/MITK,danielknorr/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,MITK/MITK,nocnokneo/MITK,rfloca/MITK,fmilano/mitk,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,MITK/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,MITK/MITK,NifTK/MITK,danielk... |
3cd04e32a8cd9497bd2882d7767e40ae9a936e24 | test/sanitizer_common/print_address.h | test/sanitizer_common/print_address.h | #include <stdio.h>
#include <stdarg.h>
void print_address(const char *str, int n, ...) {
fprintf(stderr, "%s", str);
va_list ap;
va_start(ap, n);
while (n--) {
void *p = va_arg(ap, void *);
#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
// On FreeBSD, the %p conversion specif... | #include <stdio.h>
#include <stdarg.h>
void print_address(const char *str, int n, ...) {
fprintf(stderr, "%s", str);
va_list ap;
va_start(ap, n);
while (n--) {
void *p = va_arg(ap, void *);
#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
// On FreeBSD, the %p conversion specif... | Use 0-padding for i386 and arm print format specifiers | Use 0-padding for i386 and arm print format specifiers
Summary:
This is used for the other architectures in print_address, but is
missing from i386 and arm.
Reviewers: m.ostapenko, spetrovic
Subscribers: aemerson, rengolin, llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D31977
git-svn-id:... | C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
3fff79f7dd1d8821a2d6c730f2aff3f994a15558 | crypto/s2n_hkdf.h | crypto/s2n_hkdf.h | /*
* Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... | /*
* Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... | Add missing header changes from previous commit | Add missing header changes from previous commit
| C | apache-2.0 | wcs1only/s2n,awslabs/s2n,gibson-compsci/s2n,PKRoma/s2n,awslabs/s2n,PKRoma/s2n,colmmacc/s2n,alexeblee/s2n,raycoll/s2n,raycoll/s2n,wcs1only/s2n,PKRoma/s2n,alexeblee/s2n,gibson-compsci/s2n,wcs1only/s2n,colmmacc/s2n,raycoll/s2n,wcs1only/s2n,colmmacc/s2n,wcs1only/s2n,awslabs/s2n,raycoll/s2n,PKRoma/s2n,PKRoma/s2n,alexeblee/s... |
412865c8ea9f94a487d9887360b8adb6032e6a80 | test/Profile/profile-does-not-exist.c | test/Profile/profile-does-not-exist.c | // RUN: not %clang_cc1 -emit-llvm %s -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s
// CHECK: error: Could not read profile:
// CHECK-NOT: Assertion failed
| // RUN: not %clang_cc1 -emit-llvm %s -o - -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s
// CHECK: error: Could not read profile:
// CHECK-NOT: Assertion failed
| Fix this test so it doesn't try to open a file to write to the source tree | Fix this test so it doesn't try to open a file to write to the source tree
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@234173 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
75488d5639819f31b01f76433b82d6259323230d | unix-cpy/mpconfigport.h | unix-cpy/mpconfigport.h | // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_ENABLE_FLOAT (1)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsigned long machine_uint_t... | // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsi... | Switch to use MICROPY_FLOAT_IMPL config define. | unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
| C | mit | micropython/micropython-esp32,SHA2017-badge/micropython-esp32,torwag/micropython,AriZuu/micropython,xhat/micropython,utopiaprince/micropython,AriZuu/micropython,ahotam/micropython,heisewangluo/micropython,firstval/micropython,hiway/micropython,cloudformdesign/micropython,mianos/micropython,kostyll/micropython,Timmenem/... |
1a3c1576138400b28ca7093a842dc7d044d5892b | MKFirebaseObjectMapping/Classes/MKFirebaseModel.h | MKFirebaseObjectMapping/Classes/MKFirebaseModel.h | //
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | //
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | Add `isEqualToFirebaseModel:` to public header | Add `isEqualToFirebaseModel:` to public header
| C | mit | mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping |
8e1f636ced4380a559aaf8eb14cae88442fc15c1 | lib/Solenoid/Solenoid.h | lib/Solenoid/Solenoid.h | /****************************************************************************
* Copyright 2016 BlueMasters
*
* 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... | /****************************************************************************
* Copyright 2016 BlueMasters
*
* 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... | Put states inside the class | Put states inside the class
| C | apache-2.0 | BlueMasters/arduino-wolves,BlueMasters/arduino-wolves,BlueMasters/arduino-wolves |
34ac8717bf58b13a6c2b8743e57506255434d731 | src/Developer/ImageFilterMultipleOutputs.h | src/Developer/ImageFilterMultipleOutputs.h | #ifndef __itkImageFilterMultipleOutputs_h
#define __itkImageFilterMultipleOutputs_h
#include "itkImageToImageFilter.h"
namespace itk
{
template <class TImage>
class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage>
{
public:
/** Standard class type alias. */
using Self = ImageFilterMultipleOu... | #ifndef __itkImageFilterMultipleOutputs_h
#define __itkImageFilterMultipleOutputs_h
#include "itkImageToImageFilter.h"
namespace itk
{
template <class TImage>
class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage>
{
public:
/** Standard class type alias. */
using Self = ImageFilterMultipleOu... | Remove redundant void argument lists | STYLE: Remove redundant void argument lists
Find and remove redundant void argument lists.
| C | apache-2.0 | InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples |
fdeab35e4997c16515efea32d97845786d373990 | tests/test_utilities.h | tests/test_utilities.h | #pragma once
#include <string>
#include <sstream>
#include <Eigen/Dense>
std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) {
std::stringstream ss;
ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl;
return ss.str();
}
| #pragma once
#include <string>
#include <sstream>
#include <Eigen/Dense>
std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) {
std::stringstream ss;
ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl;
return ss.str();
}
/*
* allclose() function to match nump... | Add allclose function for testing | Add allclose function for testing
Compare relative and absolute tolerence of matrix elements. Eigen
isApprox() functions compare matrix norms.
| C | bsd-2-clause | oliverlee/bicycle,oliverlee/bicycle |
4282ccf09f23c582b16cdc4570de238ac959a2dd | firmware/MDNS.h | firmware/MDNS.h | #include "application.h"
#ifndef _INCL_MDNS
#define _INCL_MDNS
#include "Buffer.h"
#include "Label.h"
#include "Record.h"
#include <map>
#include <vector>
#define MDNS_PORT 5353
#define BUFFER_SIZE 512
#define HOSTNAME ""
class MDNS {
public:
bool setHostname(String hostname);
bool addService(String protocol... | #include "application.h"
#ifndef _INCL_MDNS
#define _INCL_MDNS
#include "Buffer.h"
#include "Label.h"
#include "Record.h"
#include <map>
#include <vector>
#define MDNS_PORT 5353
#define BUFFER_SIZE 512
#define HOSTNAME ""
class MDNS {
public:
bool setHostname(String hostname);
bool addService(String protocol... | Fix for particle firmware v0.6.2 | Fix for particle firmware v0.6.2 | C | mit | mrhornsby/spark-core-mdns,mrhornsby/spark-core-mdns |
3cfe2d2e5b57ff33d4febcb0668d1d71fce2dd21 | acacia_tests.c | acacia_tests.c | #include <string.h>
#include "lib/minunit.h"
#include "acacia.h"
//#define TEST_KEY "abcd1111"
#define TEST_KEY "abcdefghijklmnopqrstuvwxyz"
#define TEST_VALUE "foo_bar_baz_111"
MU_TEST(test_check) {
struct Node *cache = cache_init();
cache_set(TEST_KEY, TEST_VALUE, cache);
mu_check(strcmp(cache_get(TEST_KEY, cac... | #include <string.h>
#include "lib/minunit.h"
#include "acacia.h"
#define TEST_KEY "abcdefghijklmnopqrstuvwxyz"
#define TEST_VALUE "foo_bar_baz_111"
MU_TEST(test_store_fetch_simple) {
struct Node *cache = cache_init();
cache_set(TEST_KEY, TEST_VALUE, cache);
mu_check(strcmp(cache_get(TEST_KEY, cache), TEST_VALUE) ... | Add a test for caching an empty string | Add a test for caching an empty string
| C | mit | zedr/acacia |
3a04ce29a2d92f58ab07f83f4970c544e4afdf00 | testsuite/tests/rts/exec_signals_prepare.c | testsuite/tests/rts/exec_signals_prepare.c | #include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
// Invokes a process, making sure that the state of the signal
// handlers has all been set back to the unix default.
int main(int argc, char **argv)
{
int i;
sigset_t blockedsigs;
struct sigaction action;
// unblock all sig... | #include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
// Invokes a process, making sure that the state of the signal
// handlers has all been set back to the unix default.
int main(int argc, char **argv)
{
int i;
sigset_t blockedsigs;
struct sigaction action;
... | Fix below warning by including "unistd.h" also | Fix below warning by including "unistd.h" also
exec_signals_prepare.c:26:5: warning: implicit declaration of function 'execv' is invalid in C99
[-Wimplicit-function-declaration]
execv(argv[1], argv+1);
^
1 warning generated.
| C | bsd-3-clause | vTurbine/ghc,sdiehl/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,nathyong/microghc-ghc,ryantm/ghc,urbanslug/ghc,jstolarek/ghc,sdiehl/ghc,TomMD/ghc,vTurbine/ghc,TomMD/ghc,snoyberg/ghc,sdiehl/ghc,spacekitteh/smcghc,jstolarek/ghc,jstolarek/ghc,ezyang/ghc,snoyberg/ghc,mcschroeder/ghc,lukexi/ghc,acowley/ghc,elieux/ghc,christiaanb/g... |
c1e92e075a259543719f7410290aeaffefe783b2 | include/Map.h | include/Map.h | #ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
const std::string getPlantName() const { return isStood_? plant_->getName() : "Empty"; }
bool put(Plant & plant);
bool getStood()const{return isStood_;}
private:
Plant * plant_ = nullptr;
bool isStood... | #ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
bool put(Plant & plant);
bool getStood()const{return isStood_;}
Plant & getPlant() { return *plant_; }
const Plant & getPlant() const { return *plant_; }
private:
Plant * plant_ = nullptr;
bool isStood_ =... | Remove getPlantName metohod & Add getPlant mathod | Remove getPlantName metohod & Add getPlant mathod
| C | mit | wi1d5ky/AP-Team-Project |
b3f4c5d49830a8ef77ec1d74e8100fe3cc561230 | include/api/ofp_odp_compat.h | include/api/ofp_odp_compat.h | /* Copyright (c) 2015, ENEA Software AB
* Copyright (c) 2015, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_ODP_COMPAT__
#define __OFP_ODP_COMPAT__
#if ODP_VERSION == 102
#include "linux.h"
#else
#include "odp/helper/linux.h"
#endif /* odp_version == 102 */
#if ODP_... | /* Copyright (c) 2015, ENEA Software AB
* Copyright (c) 2015, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_ODP_COMPAT__
#define __OFP_ODP_COMPAT__
#if ODP_VERSION == 102
#include "linux.h"
#else
#include "odp/helper/linux.h"
#endif /* odp_version == 102 */
#if ODP_... | Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them. | Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them.
Defining odp_init_local like this we can initialized properly the
values of ODP_THREAD_WORKER and ODP_THREAD_CONTROL. This is important
for the following patch where we need to define odp_threat_type_t.
Signed-off-by: ... | C | bsd-3-clause | OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,TolikH/ofp,OpenFastPath/ofp,TolikH/ofp |
00126c32c776459b75e5d2bfaba28bd261c1510a | h5py/api_compat.h | h5py/api_compat.h | /***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | /***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py. | Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py.
Follows gh-401 https://groups.google.com/d/topic/h5py/Uw5x3BKwJGU/discussion and https://groups.google.com/d/topic/mpi4py/xnDyYvawB-Q/discussion.
| C | bsd-3-clause | h5py/h5py,h5py/h5py,h5py/h5py |
7a79b1da0c124fb642658c3698a38fdd9e77eb01 | libc/string/strlcpy.c | libc/string/strlcpy.c | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(strlcpy, strxfrm)
#endif
#undef L_... | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(__strlcpy, __strxfrm)
strong_alias(... | Use correct syntax, correct weak/strong for [__]strxfrm | Use correct syntax, correct weak/strong for [__]strxfrm
| C | lgpl-2.1 | hjl-tools/uClibc,klee/klee-uclibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,kraj/uclibc-ng,gittup/uClibc,groundwater/uClibc,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ndmsystems/uClibc,mephi42/uClibc,waweber/uclibc-clang,majek/uclibc-vx32,hjl-tools/uClibc,waweber/uclibc-clang,kraj/uclibc-ng,atgreen/u... |
3b4851ccd8e04b2db4127ced955cbfecb1e99786 | libc/string/strlcpy.c | libc/string/strlcpy.c | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(strlcpy, strxfrm)
#endif
#undef L_... | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(__strlcpy, __strxfrm)
strong_alias(... | Use correct syntax, correct weak/strong for [__]strxfrm | Use correct syntax, correct weak/strong for [__]strxfrm
| C | lgpl-2.1 | joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc |
e44bcd18b20baba5fa95000415440f83c36a9599 | libk/src/hook/fcntl.c | libk/src/hook/fcntl.c | #include <fcntl.h>
#include <k/sys.h>
int open(const char *path, int oflag, ...) {
return MAKE_SYSCALL(open, path, oflag);
}
int fcntl(int fildes, int cmd, ...) {
//FIXME for bash
return MAKE_SYSCALL(unimplemented, "fcntl", false);
}
| #include <fcntl.h>
#include <stdarg.h>
#include <k/sys.h>
int open(const char *path, int oflag, ...) {
int mode = 0;
if(oflag & O_CREAT) {
va_list va;
va_start(va, oflag);
mode = va_arg(va, int);
va_end(va);
}
return MAKE_SYSCALL(open, path, oflag, mode);
}
int fcntl(in... | Fix open() syscall in libk | Fix open() syscall in libk
| C | bsd-2-clause | escortkeel/k-os,escortkeel/k-os,escortkeel/k-os |
227a2bd5dc57ee93bf4b4ea9e3a2c8837e629f51 | brightray/browser/mac/cocoa_notification.h | brightray/browser/mac/cocoa_notification.h | // Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#define BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#import <Foundation/Foundation.h>
#include <string>
#include "base/mac/scoped... | // Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#define BRIGHTRAY_BROWSER_MAC_COCOA_NOTIFICATION_H_
#import <Foundation/Foundation.h>
#include <string>
#include "base/mac/scoped... | Fix reference typed reply placeholder | Fix reference typed reply placeholder
| C | mit | bpasero/electron,thomsonreuters/electron,gerhardberger/electron,the-ress/electron,thomsonreuters/electron,gerhardberger/electron,wan-qy/electron,renaesop/electron,seanchas116/electron,tonyganch/electron,electron/electron,wan-qy/electron,the-ress/electron,thomsonreuters/electron,electron/electron,gerhardberger/electron,... |
858230f4528ad2f418f97414e3a8be46865c367c | include/math_defs.h | include/math_defs.h | #ifndef AL_MATH_DEFS_H
#define AL_MATH_DEFS_H
#define F_PI (3.14159265358979323846f)
#define F_PI_2 (1.57079632679489661923f)
#define F_TAU (6.28318530717958647692f)
#ifndef FLT_EPSILON
#define FLT_EPSILON (1.19209290e-07f)
#endif
#define DEG2RAD(x) ((ALfloat)(x) * (F_PI/180.0f))
#define RAD2DEG(x) ((ALfloat... | #ifndef AL_MATH_DEFS_H
#define AL_MATH_DEFS_H
#ifdef HAVE_FLOAT_H
#include <float.h>
#endif
#define F_PI (3.14159265358979323846f)
#define F_PI_2 (1.57079632679489661923f)
#define F_TAU (6.28318530717958647692f)
#ifndef FLT_EPSILON
#define FLT_EPSILON (1.19209290e-07f)
#endif
#define DEG2RAD(x) ((ALfloat)(x)... | Include float.h if present before defining math stuff | Include float.h if present before defining math stuff
| C | lgpl-2.1 | aaronmjacobs/openal-soft,alexxvk/openal-soft,alexxvk/openal-soft,aaronmjacobs/openal-soft |
43d02e8878a075f2affa41f972c0088ee93f6e8e | lib/haka/regexp_module.c | lib/haka/regexp_module.c | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <haka/error.h>
#include <haka/regexp_module.h>
struct regexp_module *regexp_module_load(const char *modu... | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <haka/error.h>
#include <haka/regexp_module.h>
struct regexp_module *regexp_module_load(const char *modu... | Replace cast by safer access | Replace cast by safer access
| C | mpl-2.0 | nabilbendafi/haka,haka-security/haka,lcheylus/haka,nabilbendafi/haka,LubyRuffy/haka,Wingless-Archangel/haka,lcheylus/haka,haka-security/haka,haka-security/haka,Wingless-Archangel/haka,nabilbendafi/haka,LubyRuffy/haka,lcheylus/haka |
3fdc17f34aed6c08c6803dd91db59dc2971df9b6 | add.c | add.c |
#include "cx/fileb.h"
static real
sum_line (FileB* f)
{
real x = 0, y = 0;
while (load_real_FileB (f, &y))
x += y;
return x;
}
int main ()
{
DecloStack( FileB, f );
FILE* in = stdin;
FILE* out = stdout;
init_FileB (f);
f->f = in;
f->byline = true;
while (getline_File... |
#include "cx/fileb.h"
static real
sum_line (FileB* f)
{
real x = 0, y = 0;
while (load_real_FileB (f, &y))
x += y;
f->good = true;
skipds_FileB (f, 0);
if (cstr_FileB (f) [0] != '\0')
fputs ("Line is no good!\n", stderr);
return x;
}
int main ()
{
DecloStack( FileB, f );
... | Add utility gives a warning on bad parse | Add utility gives a warning on bad parse
| C | isc | grencez/lace,grencez/lace |
57617193daeecc6ec6adf1057dbd687464558259 | demo1/src/demo/object/itickable.h | demo1/src/demo/object/itickable.h | // itickable.h
//
// Interface definition of an object that is updated during the tick cycle.
//
#ifndef DEMO_ITICKABLE_H
#define DEMO_ITICKABLE_H
namespace demo
{
namespace obj
{
class ITickable
{
public:
// CONSTRUCTORS
~ITickable();
// MEMBER FUNCTIONS
/**
* Prepare for the next tick cycle... | // itickable.h
//
// Interface definition of an object that is updated during the tick cycle.
//
#ifndef DEMO_ITICKABLE_H
#define DEMO_ITICKABLE_H
namespace demo
{
namespace obj
{
class ITickable
{
public:
// CONSTRUCTORS
/**
* Destruct the tickable.
*/
~ITickable();
// MEMBER FUNCTIONS
... | Clean up the tickable definition. | Clean up the tickable definition.
| C | mit | invaderjon/demo,invaderjon/demo |
040f741c3387244091f24f7232ee85485b77f1f3 | Source/HYPScatterPlot.h | Source/HYPScatterPlot.h | @import UIKit;
@protocol HYPScatterPlotDataSource;
@class HYPScatterPoint;
@class HYPScatterLabel;
@interface HYPScatterPlot : UIView
@property (nonatomic) UIColor *averageLineColor;
@property (nonatomic) UIColor *xAxisColor;
@property (nonatomic) UIColor *yAxisMidGradient;
@property (nonatomic) UIColor *yAxisEndGr... | @import UIKit;
@protocol HYPScatterPlotDataSource;
@class HYPScatterPoint;
@class HYPScatterLabel;
@interface HYPScatterPlot : UIView
@property (nonatomic) UIColor *averageLineColor;
@property (nonatomic) UIColor *xAxisColor;
@property (nonatomic) UIColor *yAxisMidGradient;
@property (nonatomic) UIColor *yAxisEndGr... | Add an important info. for scatter datasource | Add an important info. for scatter datasource
| C | mit | hyperoslo/Scatter |
79e3842130d52a70d1f134edf055612220b77bdc | flash_writer.h | flash_writer.h |
#ifndef FLASH_WRITER_H
#define FLASH_WRITER_H
#include <stdint.h>
#include <stddef.h>
/** Unlocks the flash for programming. */
void flash_writer_unlock(void);
/** Locks the flash */
void flash_writer_lock(void);
/** Erases the flash page at given address. */
void flash_writer_page_erase(void *page);
/** Writes d... | #ifndef FLASH_WRITER_H
#define FLASH_WRITER_H
#include <stdint.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Unlocks the flash for programming. */
void flash_writer_unlock(void);
/** Locks the flash */
void flash_writer_lock(void);
/** Erases the flash page at given address. */
void flash_write... | Add missing extern "C" statements | Add missing extern "C" statements
| C | bsd-2-clause | cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader |
d4a07988c8ba6b214e8d93c3a4048357484ba771 | test/Analysis/stack-addr-ps.c | test/Analysis/stack-addr-ps.c | // RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Addre... | // RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Addre... | Improve compound literal test case. | Improve compound literal test case.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58447 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
a9faab2fa55c45a9886d59c2367a498e8018227f | mainwindow.h | mainwindow.h | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_enableSizeButton_clicked();
private:
Ui::MainWindow *ui;
... | #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_enableSizeButton_clicked();
private:
Ui::MainWindow *ui;
... | Remove unnecessary fields in class. | Remove unnecessary fields in class.
| C | mit | ivanshchitov/solving-system-ode |
9698919d35fe7ffdc9e4e4e88de50692d115be10 | Sources/include/HTMLNode+Private.h | Sources/include/HTMLNode+Private.h | //
// HTMLNode+Private.h
// HTMLKit
//
// Created by Iska on 20/12/15.
// Copyright © 2015 BrainCookie. All rights reserved.
//
///------------------------------------------------------
/// HTMLKit private header
///------------------------------------------------------
#import <HTMLKit/HTMLKit.h>
/**
Private H... | //
// HTMLNode+Private.h
// HTMLKit
//
// Created by Iska on 20/12/15.
// Copyright © 2015 BrainCookie. All rights reserved.
//
///------------------------------------------------------
/// HTMLKit private header
///------------------------------------------------------
#import "HTMLNode.h"
/**
Private HTML Nod... | Fix import in private HTMLNode header | Fix import in private HTMLNode header
| C | mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit |
5e9b10290a20a4d141e6db96a2f4b767ad5077ea | src/SGFeature.h | src/SGFeature.h | //
// SGFeature.h
// SimpleGeo
//
// Created by Seth Fitzsimmons on 11/14/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "SGPoint.h"
@interface SGFeature : NSObject
{
NSString* featureId;
SGPoint* geometry;
NSDictionary* properties;
NSString* rawBody;
}
@property (reado... | //
// SGFeature.h
// SimpleGeo
//
// Created by Seth Fitzsimmons on 11/14/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "SGPoint.h"
@interface SGFeature : NSObject
{
NSString* featureId;
SGPoint* geometry;
NSDictionary* properties;
NSString* rawBody;
}
@property (retai... | Revert "No reason for readonly properties to be retained" | Revert "No reason for readonly properties to be retained"
This reverts commit eeed3d87ea740ab73995af2de8f044e3a9a3082d.
| C | bsd-3-clause | simplegeo/SimpleGeo.framework,simplegeo/SimpleGeo.framework,simplegeo/SimpleGeo.framework |
c3afaa342f30aded4270e96254cf0729058e06e8 | trie.c | trie.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <util.h>
#include "trie.h"
#define char_index(c) c - 97
trie *
trie_init(void)
{
trie *t = emalloc(sizeof(*t));
memset(t, 0, sizeof(*t));
t->children = emalloc(R_SIZE * sizeof(*(t->children)));
memset(t->children, 0, sizeof(*(t->children)));
re... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <util.h>
#include "trie.h"
#define char_index(c) c - 97
trie *
trie_init(void)
{
trie *t = emalloc(sizeof(*t));
memset(t, 0, sizeof(*t));
t->children = ecalloc(R_SIZE, sizeof(*(t->children)));
return t;
}
void
trie_insert(trie *t, const char *k... | Replace malloc + memset with calloc | Replace malloc + memset with calloc
| C | bsd-2-clause | abhinav-upadhyay/nbspell,abhinav-upadhyay/nbspell |
a1556864e486f61c4bf974f5a5595ee4511977b1 | src/util/util_version.h | src/util/util_version.h | /*
* Copyright 2011-2016 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | /*
* Copyright 2011-2016 Blender Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | Bump Cycles version to 1.11.0 (Blender 2.81) | Bump Cycles version to 1.11.0 (Blender 2.81)
| C | apache-2.0 | tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird |
d099ccc83b7cb2a7809708722f515c5e091293df | chrome/browser/cocoa/objc_zombie.h | chrome/browser/cocoa/objc_zombie.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// Yo... | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#define CHROME_BROWSER_COCOA_NSOBJECT_ZOMBIE_H_
#pragma once
#import <Foundation/Foundation.h>
// Yo... | Add link to explanation of what we mean by zombie The person triaging / debugging a zombie crash may never have heard of this before. | Add link to explanation of what we mean by zombie
The person triaging / debugging a zombie crash may never have heard of this before.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/3763002
git-svn-id: http://src.chromium.org/svn/trunk/src@62723 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: a... | C | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... |
27b36d361060857849880209794c6f6f98457bfe | csapex_ros/src/ros_boot.h | csapex_ros/src/ros_boot.h | #ifndef ROS_BOOT_H
#define ROS_BOOT_H
/// PROJECT
#include <csapex/core/bootstrap_plugin.h>
#include <csapex/core/core_fwd.h>
#include <csapex/model/model_fwd.h>
#include <csapex/msg/msg_fwd.h>
#include <csapex/view/view_fwd.h>
/// SYSTEM
// clang-format off
#include <csapex/utility/suppress_warnings_start.h>
#includ... | #ifndef ROS_BOOT_H
#define ROS_BOOT_H
/// PROJECT
#include <csapex/core/bootstrap_plugin.h>
#include <csapex/core/core_fwd.h>
#include <csapex/model/model_fwd.h>
#include <csapex/msg/msg_fwd.h>
#include <csapex/view/view_fwd.h>
/// SYSTEM
// clang-format off
#include <csapex/utility/suppress_warnings_start.h>
#if CLA... | Fix jade version of class_loader not containing class_loader.hpp | Fix jade version of class_loader not containing class_loader.hpp
| C | bsd-3-clause | cogsys-tuebingen/csapex_core_plugins,cogsys-tuebingen/csapex_core_plugins,cogsys-tuebingen/csapex_core_plugins |
eaaf1b668cc99633072ac6c63d2db9dee03fbef5 | server/gwkv_ht_wrapper.h | server/gwkv_ht_wrapper.h | #ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
#include "../hashtable/hashtable.h"
/* Operations the table supports */
typedef enum {
GET,
SET
} method;
/* Defines for result codes */
#define STORED 0
#define NOT_STORED 1
#define EXISTS 2
#define NOT_FOUND 3
/* Datatype for wrap... | #ifndef GWKV_HT_WRAPPER
#define GWKV_HT_WRAPPER
#include <stdlib.h>
#include "../hashtable/hashtable.h"
/* Types of hashing algorithms we support */
typedef enum {
MD5
} hash_type;
/* All encompassing datatype for server datastore */
struct {
ht* hashtable,
hash_type hash
} gwkv_server;
/* O... | Add struct to keep datastore things | Add struct to keep datastore things
| C | mit | gwAdvNet2015/gw-kv-store |
e9a50022c0fd0f5ca60fd12c542ba9bbdfda7606 | src/docs.h | src/docs.h | static const char *docs_usage[] = {
"usage enchive [-p|--pubkey <file>] [-s|--seckey <file>]",
#if ENCHIVE_OPTION_AGENT
" [-a|--agent[=seconds]] [-A|--no-agent]",
#endif
" [--version] [--help]",
" <command> [args]",
"",
"Commands (unique prefixes accepted):",
" keygen gene... | static const char *docs_usage[] = {
"usage enchive [-p|--pubkey <file>] [-s|--seckey <file>]",
#if ENCHIVE_OPTION_AGENT
" [-a|--agent[=seconds]] [-A|--no-agent]",
#endif
" [--version] [--help]",
" <command> [args]",
"",
"Commands (unique prefixes accepted):",
" keygen gene... | Remove incorrect path defaults from --help | Remove incorrect path defaults from --help
| C | unlicense | skeeto/enchive |
f969a9b919fb9765c8f955ab2c68284c41abb097 | aes.c | aes.c | #include <stdio.h>
#include "aes.h"
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned ch... | #include <stdio.h>
#include "aes.h"
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned ch... | Use a static variable to track whether to use AES-NI | Use a static variable to track whether to use AES-NI
| C | bsd-2-clause | seankelly/aesni,seankelly/aesni |
c2b83606e10756537cdbeb528815808a810460d8 | ch1/e01-20_detab.c | ch1/e01-20_detab.c | /*
* detab: Replace tabs with blanks.
*/
#include <stdio.h>
#define MAXLINE 10000 /* Max input line length. */
#define TABSTOP 8 /* Set tab stop to eight characters. */
int getaline(char *, int);
void detab(char *);
/* detab: Replace tabs with blanks. */
int
main(void)
{
char line[MAXLINE]; /* Current input lin... | /*
* detab: Replace tabs with blanks.
*/
#include <stdio.h>
#define TABSIZE 8
/* detab: Replace tabs with blanks. */
int
main(void)
{
int ch, i;
for (i = 0; (ch = getchar()) != EOF; i++) {
if (ch == '\n')
i = 0;
if (ch == '\t') {
putchar(' ');
while (i % TABSIZE) {
putchar(' ');
i++;
}
... | Make detab actually work reliably. | Make detab actually work reliably.
| C | isc | chettrick/tcpl |
e4b57f3333a9da01b823a0024291c64728c688b4 | Sources/include/HTMLText.h | Sources/include/HTMLText.h | //
// HTMLText.h
// HTMLKit
//
// Created by Iska on 26/02/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import "HTMLCharacterData.h"
NS_ASSUME_NONNULL_BEGIN
/**
A HTML Text node
*/
@interface HTMLText : HTMLCharacterData
/**
Initializes a new HTML text node.
@param data The text string.
... | //
// HTMLText.h
// HTMLKit
//
// Created by Iska on 26/02/15.
// Copyright (c) 2015 BrainCookie. All rights reserved.
//
#import "HTMLCharacterData.h"
NS_ASSUME_NONNULL_BEGIN
/**
A HTML Text node
*/
@interface HTMLText : HTMLCharacterData
/**
Initializes a new HTML text node.
@param data The text string.
... | Update deprecation message in HTML Text node | Update deprecation message in HTML Text node
| C | mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit |
7283c0eb982a87ac5afe2897a78f470e078c1e24 | cmd/smyrna/gui/topviewsettings.h | cmd/smyrna/gui/topviewsettings.h | #ifndef TOPVIEWSETTINGS_H
#define TOPVIEWSETTINGS_H
#include "smyrnadefs.h"
_BB void on_settingsOKBtn_clicked (GtkWidget *widget,gpointer user_data);
_BB void on_settingsCancelBtn_clicked (GtkWidget *widget,gpointer user_data);
int load_settings_from_graph(Agraph_t *g);
int update_graph_from_settings(Agraph_t *g);
... | /* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp... | Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings | Clean up smyrna files:
remove unnecessary globals
modify libraries not to rely on code in cmd/smyrna
remove static declarations from .h files
remove unnecessary libraries
mark unused code and clean up warnings
| C | epl-1.0 | pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,Mj... |
8207e9b84e9581d286baf5869b9dcbf6351ddd50 | nwn2mdk-lib/cgmath.h | nwn2mdk-lib/cgmath.h | #pragma once
template <typename T>
class Vector3 {
public:
T x, y, z;
Vector3(T x, T y, T z)
{
this->x = x;
this->y = y;
this->z = z;
}
};
template <typename T>
class Vector4 {
public:
T x, y, z, w;
Vector4() {}
Vector4(T x, T y, T z, T w)
{
this->x = x;
this->y = y;
this->z = z;
this->w = w;... | #pragma once
template <typename T>
class Vector3 {
public:
T x, y, z;
Vector3(T x, T y, T z)
{
this->x = x;
this->y = y;
this->z = z;
}
T &operator[](unsigned i)
{
return (&x)[i];
}
};
template <typename T>
class Vector4 {
public:
T x, y, z, w;
Vector4() {}
Vector4(T x, T y, T z, T w)
{
this-... | Add subscript operator to Vector3 | Add subscript operator to Vector3
| C | apache-2.0 | Arbos/nwn2mdk,Arbos/nwn2mdk,Arbos/nwn2mdk |
4e74db8e51a59530d7dd2caf48694322ab4cd22b | src/xenia/kernel/objects/xsemaphore.h | src/xenia/kernel/objects/xsemaphore.h | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. ... | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. ... | Add the dispatch header to X_SEMAPHORE | Add the dispatch header to X_SEMAPHORE
| C | bsd-3-clause | greg100795/xenia,KitoHo/xenia,TRex22/xenia,bowlofstew/xenia,DaTrollMon/xenia,no1dead/xenia,DaTrollMon/xenia,Rhodan81/xenia,TRex22/xenia,toxic88/xenia,KitoHo/xenia,herman-rogers/xenia,TingPing/xenia,pwz3n0/xenia,AbaiQi/xenia,MorganBauer/xenia,Drooids/xenia,no1dead/xenia,TRex22/xenia,AbaiQi/xenia,Rhodan81/xenia,no1dead/x... |
ad34178a661c3ff2f0d3caa387b291fb72c49743 | src/cpu/register.h | src/cpu/register.h | #pragma once
#include "../definitions.h"
class ByteRegister {
public:
ByteRegister() {};
void set(const u8 new_value) { val = new_value; };
u8 value() const { return val; };
void increment() { val += 1; };
void decrement() { val -= 1; };
private:
u8 val;
};
class WordRegister {
public:
... | #pragma once
#include "../definitions.h"
class ByteRegister {
public:
ByteRegister() {}
void set(const u8 new_value) { val = new_value; }
u8 value() const { return val; }
void increment() { val += 1; }
void decrement() { val -= 1; }
private:
u8 val;
};
class WordRegister {
public:
Word... | Remove unnecessary semicolon after method definitions | Remove unnecessary semicolon after method definitions
| C | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
086ad04698d337ba3b4505b320e97eb1c4360e84 | tests/sarray_tests.c | tests/sarray_tests.c | #include "minunit.h"
#include <lcthw/sarray.h>
char *test_create_destroy()
{
char test[] = "abracadabra";
char test2[] = "acadabra";
SuffixArray *sarry = SuffixArray_create(test, sizeof(test));
mu_assert(sarry, "Failed to create.");
int at = SuffixArray_find_suffix(sarry, test2, sizeof(test2));
... | #include "minunit.h"
#include <lcthw/sarray.h>
static SuffixArray *sarry = NULL;
static char test[] = "abracadabra";
static char test2[] = "acadabra";
char *test_create()
{
sarry = SuffixArray_create(test, sizeof(test));
mu_assert(sarry, "Failed to create.");
return NULL;
}
char *test_destroy()
{
Su... | Clean up suffix array tests. | Clean up suffix array tests.
| C | bsd-3-clause | HappyYang/liblcthw,HappyYang/liblcthw,HappyYang/liblcthw |
96de597b3c9491bb257526cb7ed817238c88916a | string_hash.h | string_hash.h | #include <string.h>
#include <stdint.h>
/**
* Efficient string hash function.
*/
static uint32_t string_hash(const char *str)
{
uint32_t hash = 0;
int32_t c;
while ((c = *str++))
{
hash = c + (hash << 6) + (hash << 16) - hash;
}
return hash;
}
/**
* Test two strings for equality.
*/
static int string_comp... | #include <string.h>
#include <stdint.h>
/**
* Efficient string hash function.
*/
__attribute__((unused))
static uint32_t string_hash(const char *str)
{
uint32_t hash = 0;
int32_t c;
while ((c = *str++))
{
hash = c + (hash << 6) + (hash << 16) - hash;
}
return hash;
}
/**
* Test two strings for equality.
*... | Mark string functions unused, in case the header is included in files that only use one of them. | Mark string functions unused, in case the header is included in files that only use one of them.
| C | mit | darlinghq/darling-libobjc2,davidchisnall/libobjc2,ngrewe/libobjc2,crystax/android-vendor-libobjc2,gnustep/libobjc2,davidchisnall/libobjc2,gnustep/libobjc2,crystax/android-vendor-libobjc2,darlinghq/darling-libobjc2,ngrewe/libobjc2 |
d57f4614642ddd22e03f184f5fb430c42f2c4f68 | dev/pci/drm/r600_blit_shaders.h | dev/pci/drm/r600_blit_shaders.h |
#ifndef R600_BLIT_SHADERS_H
#define R600_BLIT_SHADERS_H
extern const u32 r6xx_ps[];
extern const u32 r6xx_vs[];
extern const u32 r7xx_default_state[];
extern const u32 r6xx_default_state[];
extern const u32 r6xx_ps_size, r6xx_vs_size;
extern const u32 r6xx_default_size, r7xx_default_size;
#endif
| /*
* Copyright 2009 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, m... | Add missing license (amd, mit/x11) | Add missing license (amd, mit/x11)
armani@ noticed that is was missing.
| C | isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars |
afa170f2cfa7e84e99559d0f1b3ceafec9c75de0 | test/Driver/unknown-arg.c | test/Driver/unknown-arg.c | // RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
| // RUN: not %clang_cc1 %s -cake-is-lie -%0 -%d 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
// CHECK: unknown argument
// CHECK: unknown argument
// CHECK: unknown argument
// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option -munknown-to-clang-optio
// IGNORED: warning: argument un... | Add tests on how clang currently handles some unknown options. | Add tests on how clang currently handles some unknown options.
This is not to say this is the desired behavior, but it makes sure we notice
if it changes.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191242 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
621cbbae5dc02cf57527b5a6b67f06b5224536af | templates/template.h | templates/template.h | /*
* %FFILE%
* Copyright (C) %YEAR% %USER% <%MAIL%>
*
* Distributed under terms of the %LICENSE% license.
*/
#ifndef __%GUARD%__
#define __%GUARD%__
%HERE%
#endif /* !__%GUARD%__ */
| /*
* %FFILE%
* Copyright (C) %YEAR% %USER% <%MAIL%>
*
* Distributed under terms of the %LICENSE% license.
*/
#ifndef %GUARD%
#define %GUARD%
%HERE%
#endif /* !%GUARD% */
| Remove underscores from header guard | Remove underscores from header guard
| C | bsd-2-clause | lmtim/dotfile,JohnHwee/dotfile,hacpai/dotfile,lmtim/dotfile,henry-zhuang/dotfile |
04d6348536a393439c36a7433c4fbf89c52ded32 | src/qt/clientmodel.h | src/qt/clientmodel.h | #ifndef CLIENTMODEL_H
#define CLIENTMODEL_H
#include <QObject>
class OptionsModel;
class AddressTableModel;
class TransactionTableModel;
class CWallet;
QT_BEGIN_NAMESPACE
class QDateTime;
QT_END_NAMESPACE
// Interface to Bitcoin network client
class ClientModel : public QObject
{
Q_OBJECT
public:
// The onl... | #ifndef CLIENTMODEL_H
#define CLIENTMODEL_H
#include <QObject>
class OptionsModel;
class AddressTableModel;
class TransactionTableModel;
class CWallet;
QT_BEGIN_NAMESPACE
class QDateTime;
QT_END_NAMESPACE
// Interface to Bitcoin network client
class ClientModel : public QObject
{
Q_OBJECT
public:
explicit C... | Remove no longer valid comment | Remove no longer valid comment
| C | mit | MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin,MidasPaymentLTD/midascoin |
0a39c49f370780025da6bf828bf66c1c1ab25131 | TASKS/TASK_1/sources/vector3d.h | TASKS/TASK_1/sources/vector3d.h | #ifndef VECTOR_3D_H
#define VECTOR_3D_H
#include <math.h>
namespace classes {
struct Point3D {
double x, y, z;
};
typedef const char* err;
class Vector3D {
struct Cheshire;
Cheshire* smile;
static const Point3D nullPoint;
static unsigned int idCounter;
public:
Vector3D(Point3D point = nullPoin... | #ifndef VECTOR_3D_H
#define VECTOR_3D_H
#include <math.h>
namespace classes {
struct Point3D {
double x, y, z;
};
typedef const char* err;
class Vector3D {
struct Cheshire;
Cheshire* smile;
static const Point3D nullPoint;
static unsigned int idCounter;
public:
Vector3D(Point3D point = nullPoin... | Move static methods outside of class | Move static methods outside of class
| C | mit | reeFridge/learn-oop-through-cpp |
71601dd2f566d712033352dc6dc6595374e74434 | 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 ag... | /*
* 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 ag... | Add utility function to query current value of scoped timer | Add utility function to query current value of scoped timer
| C | apache-2.0 | tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird,tangent-opensource/coreBlackbird |
ea567d2fad625aaa5163beb543ab5a1084103dab | src/include/tcop/variable.h | src/include/tcop/variable.h | /*
* Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements
*
* $Id: variable.h,v 1.6 1997/09/08 02:39:21 momjian Exp $
*
*/
enum DateFormat
{
Date_Postgres, Date_SQL, Date_ISO
};
/*-----------------------------------------------------------------------*/
struct PGVariables
{
struct
{
... | /*
* Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements
*
* $Id: variable.h,v 1.7 1997/11/07 06:45:16 thomas Exp $
*
*/
#ifndef VARIABLE_H
#define VARIABLE_H 1
enum DateFormat
{
Date_Postgres, Date_SQL, Date_ISO
};
/*-------------------------------------------------------------------... | Declare routines which support SET keyword = value SQL commands. | Declare routines which support SET keyword = value SQL commands.
| C | apache-2.0 | kaknikhil/gpdb,tangp3/gpdb,jmcatamney/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,edespino/gpdb,adam8157/gpdb,edespino/gpdb,janebeckman/gpdb,cjcjameson/gpdb,ahachete/gpdb,chrishajas/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,rubikloud/gpdb,chrishajas/gpdb,foyzur/gpdb,Postgres-XL/Postgres-XL,50wu... |
748043fe0214c54be16fadc8fa9b2f50cadfa602 | libc/signal/sigsetops.c | libc/signal/sigsetops.c | /* Define the real-function versions of all inline functions
defined in signal.h (or bits/sigset.h). */
#include <features.h>
#define _EXTERN_INLINE
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
#include "signal.h"
| /* Define the real-function versions of all inline functions
defined in signal.h (or bits/sigset.h). */
#include <features.h>
#define _EXTERN_INLINE
#ifndef __USE_EXTERN_INLINES
# define __USE_EXTERN_INLINES 1
#endif
#include <signal.h>
| Use <> instead of \"\" | Use <> instead of \"\"
| C | lgpl-2.1 | joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc |
79ac2da646ed6285fc64d6c9e7ba13f1f237be0d | test/CodeGen/pr9614.c | test/CodeGen/pr9614.c | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern void foo_alias (void) __asm ("foo");
inline void foo (void) {
return foo_alias ();
}
extern void bar_alias (void) __asm ("bar");
inline __attribute__ ((__always_inline__)) void bar (void) {
return bar_alias ();
}
extern char *strrchr_foo (const char *__s,... | // RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm %s -o - | FileCheck %s
extern void foo_alias (void) __asm ("foo");
inline void foo (void) {
return foo_alias ();
}
extern void bar_alias (void) __asm ("bar");
inline __attribute__ ((__always_inline__)) void bar (void) {
return bar_alias ();
}
extern char *strrc... | Add a triple to the test. | Add a triple to the test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@146871 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
8993b1ede652b3c81b1cae873a00716b3dd8545d | include/ipv4.h | include/ipv4.h | #ifndef IPV4_H
#define IPV4_H
#include "syshead.h"
#include "netdev.h"
#define IPV4 0x04
#define ICMPV4 0x01
struct iphdr {
uint8_t version : 4;
uint8_t ihl : 4;
uint8_t tos;
uint16_t len;
uint16_t id;
uint16_t flags : 3;
uint16_t frag_offset : 13;
uint8_t ttl;
uint8_t proto;
... | #ifndef IPV4_H
#define IPV4_H
#include "syshead.h"
#include "netdev.h"
#define IPV4 0x04
#define ICMPV4 0x01
struct iphdr {
uint8_t ihl : 4; /* TODO: Support Big Endian hosts */
uint8_t version : 4;
uint8_t tos;
uint16_t len;
uint16_t id;
uint16_t flags : 3;
uint16_t frag_offset : 13;
... | Swap fields in IPv4 header because of little endianness | Swap fields in IPv4 header because of little endianness
This should be handled more gracefully. Now, little endian byte order
is assumed.
| C | mit | saminiir/level-ip,saminiir/level-ip |
1e072dd1f87c672e871185d87b08ade975d2ebea | src/plugins/zlib/istream-bzlib.c | src/plugins/zlib/istream-bzlib.c | /* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-internal.h"
#include "istream-zlib.h"
#ifdef HAVE_BZLIB
#include <bzlib.h>
#define BZLIB_INCLUDE
#define gzFile BZFILE
#define gzdopen BZ2_bzdopen
#define gzclose BZ2_bzclose
#define gzread BZ2_bzread
#de... | /* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream-internal.h"
#include "istream-zlib.h"
#ifdef HAVE_BZLIB
#include <stdio.h>
#include <bzlib.h>
#define BZLIB_INCLUDE
#define gzFile BZFILE
#define gzdopen BZ2_bzdopen
#define gzclose BZ2_bzclose
#define gz... | Include stdio.h in case bzlib.h needs it. | bzlib: Include stdio.h in case bzlib.h needs it.
--HG--
branch : HEAD
| C | mit | jwm/dovecot-notmuch,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jkerihuel/dovecot,jwm/dovecot-notmuch,jwm/dovecot-notmuch |
9f600fc1d08d458c8ddebe839ee108dd3da324cc | src/socketmanager.h | src/socketmanager.h | #pragma once
#include "main.h"
#include "logmanager.h"
#include "modtypes/socket.h"
const std::set<unsigned int> sockAPIVersions { 3000 };
class SocketManager {
public:
std::shared_ptr<Socket> getSocket(const std::string& socketType);
private:
void removeSocket(const std::string& socketType, void* sockFile, Soc... | #pragma once
#include "main.h"
#include "logmanager.h"
#include "modtypes/socket.h"
const std::set<unsigned int> sockAPIVersions { 3000 };
class SocketManager {
public:
std::shared_ptr<Socket> getSocket(const std::string& socketType);
private:
void removeSocket(const std::string& socketType, void* sockFile, Soc... | Fix me missing the name | Fix me missing the name
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
9b5dba2ddba450639ceebdea107dca8186c6d567 | 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 82
#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 83
#endif
| Update Skia milestone to 83 | Update Skia milestone to 83
Change-Id: I7b62a8c94d1afde1bbec0c476ef8cf8d0e09b677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276636
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue... | C | bsd-3-clause | google/skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,ao... |
93d7d23a3a2d293da998187cdc9d628086a60d5f | 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 61
#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 62
#endif
| Update Skia milestone to 62 | Update Skia milestone to 62
Bug: skia:
Change-Id: I94c906422508a75a859c7c780abf520a6083cbf8
Reviewed-on: https://skia-review.googlesource.com/25360
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
| C | bsd-3-clause | google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Ten... |
49fe535bce258eb657ca32e34ef0c50667db044b | include/drivers/brcm/scp.h | include/drivers/brcm/scp.h | /*
* Copyright (c) 2017 - 2020, Broadcom
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SCP_H_
#define SCP_H
#include <stdint.h>
int download_scp_patch(void *image, unsigned int image_size);
#endif /* SCP_H */
| /*
* Copyright (c) 2017 - 2020, Broadcom
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SCP_H
#define SCP_H
#include <stdint.h>
int download_scp_patch(void *image, unsigned int image_size);
#endif /* SCP_H */
| Fix typo in file Header guard | Fix typo in file Header guard
Signed-off-by: Sheetal Tigadoli <7654421d81697baabc5c00f5d81122a6be70fe2d@broadcom.com>
Change-Id: Iaf6deaeee2069720518221157edbb052bc42850a
| C | bsd-3-clause | achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware |
3db51645690be7bf42e954bd154974b5cb5919a9 | src/main/c++/RefCache.h | src/main/c++/RefCache.h | #ifndef __REFCACHE_H__
#define __REFCACHE_H__
// Class/Method/Field ID caching
// Cache of frequently-used class references
struct _classRef {
jclass classID;
const char *className;
};
typedef struct _classRef classRef;
// Cache of frequently-used method references
struct _methodRef {
jmethodID methodID;
const i... | #ifndef __REFCACHE_H__
#define __REFCACHE_H__
// Class/Method/Field ID caching
// Cache of frequently-used class references
struct _classRef {
jclass classID;
const char *className;
};
typedef struct _classRef classRef;
// Cache of frequently-used method references
struct _methodRef {
jmethodID methodID;
int cla... | Remove constness of int fields to enable it to build on VC6.0 | Remove constness of int fields to enable it to build on VC6.0
| C | apache-2.0 | 201270842/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,steveturner/devzendo-org-xpfsa,201270842/devzendo-org-xpfsa |
8e2cc0f4fff1a414b4ea5a0d27d1a6eb8ba303ef | sys/i386/svr4/svr4_genassym.c | sys/i386/svr4/svr4_genassym.c | /* $FreeBSD$ */
/* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */
#include <sys/assym.h>
#include <sys/param.h>
struct proc;
#include <svr4/svr4.h>
#include <svr4/svr4_signal.h>
#include <svr4/svr4_ucontext.h>
/* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should
... | /* $FreeBSD$ */
/* Derived from: Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp */
#include <stddef.h>
#include <sys/param.h>
#include <sys/assym.h>
#include <svr4/svr4_signal.h>
#include <svr4/svr4_ucontext.h>
/* XXX: This bit sucks rocks, but gets rid of compiler errors. Maybe I should
* fix the includ... | Include <stddef.h> here so that <sys/assym.h> can be unpolluted. | Include <stddef.h> here so that <sys/assym.h> can be unpolluted.
Include <sys/param.h> before <sys/assym.h> in case any of the magic
in the former is ever needed in the latter.
Removed an unused forward declaration and an unused include.
| 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 |
6b5db364f5e67e85e6dfdc9865d538b7685b8577 | src/lpc17xx/timer.c | src/lpc17xx/timer.c | #include "LPC17xx.h"
#include "lpc_types.h"
#include "lpc17xx_timer.h"
#include "timer.h"
#define SYSTEM_CLOCK_TIMER LPC_TIM3
#define DELAY_TIMER LPC_TIM0
void TIMER3_IRQHandler() { }
void delayMs(int delayInMs) {
TIM_TIMERCFG_Type delayTimerConfig;
TIM_ConfigStructInit(TIM_TIMER_MODE, &delayTimerConfig);
... | #include "LPC17xx.h"
#include "lpc_types.h"
#include "lpc17xx_timer.h"
#include "timer.h"
#define SYSTEM_CLOCK_TIMER LPC_TIM3
#define DELAY_TIMER LPC_TIM0
void delayMs(int delayInMs) {
TIM_TIMERCFG_Type delayTimerConfig;
TIM_ConfigStructInit(TIM_TIMER_MODE, &delayTimerConfig);
TIM_Init(DELAY_TIMER, TIM_TI... | Store system clock as milliseconds, not microseconds. | Store system clock as milliseconds, not microseconds.
| C | bsd-3-clause | ene-ilies/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,ene-ilies/vi-firmware,ene-ilies/vi-firmware,openxc/vi-firmware,ene-ilies/vi-firmware,mgiannikouris/vi-firmware,openxc/vi-firmware,openxc/vi-firmware,mgiannikouris/vi-firmware,mgiannikouris/vi-firmware |
8bf1dce53748298038119b458ea86a2e6b2ad15b | src/gui/document.h | src/gui/document.h | /*
* Copyright (C) 2008-2013 The Communi Project
*
* This example is free, and not covered by the LGPL license. There is no
* restriction applied to their modification, redistribution, using and so on.
* You can study them, modify them, use them in your own program - either
* completely or partially.
*/
#ifndef... | /*
* Copyright (C) 2008-2013 The Communi Project
*
* This example is free, and not covered by the LGPL license. There is no
* restriction applied to their modification, redistribution, using and so on.
* You can study them, modify them, use them in your own program - either
* completely or partially.
*/
#ifndef... | Make Document::add() and remove() static | Make Document::add() and remove() static
| C | bsd-3-clause | jpnurmi/communi-desktop,sevanteri/communi-desktop,gdamjan/communi-desktop,communi/communi-desktop,communi/communi-desktop |
b641a5194c9c11cc495cad2404207f47f7d6aa54 | utils/lstopo-xml.c | utils/lstopo-xml.c | /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* See COPYING in top-level directory.
*/
#include <private/config.h>
#ifdef HAVE_XML
#include <hwloc.h>
#include "lstopo.h"
void output_xml(hwloc_topology_t topology, const char *filename, int verbose_mode)
{
if (!strcasecmp(filename, "-.xml"))
file... | /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* See COPYING in top-level directory.
*/
#include <private/config.h>
#ifdef HAVE_XML
#include <hwloc.h>
#include <string.h>
#include "lstopo.h"
void output_xml(hwloc_topology_t topology, const char *filename, int verbose_mode)
{
if (!strcasecmp(filename... | Fix compiler warning complaining about un-proto... | Fix compiler warning complaining about un-proto...
Fix compiler warning complaining about un-prototyped strcasecmp().
This commit was SVN r1191.
| C | bsd-3-clause | ggouaillardet/hwloc,ggouaillardet/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc |
30c1b638dd5d5ec429067a3b2d386bf3f585bdd1 | sdch_handler.h | sdch_handler.h | // Copyright (c) 2015 Yandex LLC. All rights reserved.
// Author: Vasily Chekalkin <bacek@yandex-team.ru>
#ifndef SDCH_HANDLER_H_
#define SDCH_HANDLER_H_
namespace sdch {
// SDCH Handler chain.
class Handler {
public:
// Construct Handler with pointer to the next Handler.
// We don't own this pointer. It's owne... | // Copyright (c) 2015 Yandex LLC. All rights reserved.
// Author: Vasily Chekalkin <bacek@yandex-team.ru>
#ifndef SDCH_HANDLER_H_
#define SDCH_HANDLER_H_
#include <cstring> // For size_t
namespace sdch {
// SDCH Handler chain.
class Handler {
public:
// Construct Handler with pointer to the next Handler.
// W... | Fix compilation by using cstring include for size_t definition | Fix compilation by using cstring include for size_t definition
| C | mit | yandex/sdch_module,yandex/sdch_module,yandex/sdch_module,yandex/sdch_module |
c88a81fc3174e3989a0d75f68f2836ab55f1639e | src/arch/freertos/csp_semaphore.c | src/arch/freertos/csp_semaphore.c |
#include <FreeRTOS.h>
#include <semphr.h>
#include <csp/arch/csp_semaphore.h>
#include <csp/csp_debug.h>
#include <csp/csp.h>
void csp_bin_sem_init(csp_bin_sem_t * sem) {
xSemaphoreCreateBinaryStatic(sem);
xSemaphoreGive(sem);
}
int csp_bin_sem_wait(csp_bin_sem_t * sem, uint32_t timeout) {
csp_log_lock("Wait: %... |
#include <FreeRTOS.h>
#include <semphr.h>
#include <csp/arch/csp_semaphore.h>
#include <csp/csp_debug.h>
#include <csp/csp.h>
void csp_bin_sem_init(csp_bin_sem_t * sem) {
xSemaphoreCreateBinaryStatic(sem);
xSemaphoreGive(sem);
}
int csp_bin_sem_wait(csp_bin_sem_t * sem, unsigned int timeout) {
csp_log_lock("Wai... | Fix function prototype for sem_wait on freertos | Fix function prototype for sem_wait on freertos
| C | mit | libcsp/libcsp,libcsp/libcsp |
7fa397ca3c0d036c835318c9214a9b7343dfcb8d | src/condor_ckpt/condor_syscalls.h | src/condor_ckpt/condor_syscalls.h | #ifndef _CONDOR_SYSCALLS_H
#define _CONDOR_SYSCALLS_H
#if defined( AIX32)
# include "syscall.aix32.h"
#else
# include <syscall.h>
#endif
typedef int BOOL;
static const int SYS_LOCAL = 1;
static const int SYS_REMOTE = 0;
static const int SYS_RECORDED = 2;
static const int SYS_MAPPED = 2;
static const int SYS_UNRE... | #ifndef _CONDOR_SYSCALLS_H
#define _CONDOR_SYSCALLS_H
#if defined( AIX32)
# include "syscall.aix32.h"
#else
# include <syscall.h>
#endif
typedef int BOOL;
static const int SYS_LOCAL = 1;
static const int SYS_REMOTE = 0;
static const int SYS_RECORDED = 2;
static const int SYS_MAPPED = 2;
static const int SYS_UNRE... | Put prototype for syscall() in for OSF/1 machines. | Put prototype for syscall() in for OSF/1 machines.
| C | apache-2.0 | neurodebian/htcondor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/condor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605... |
67cd74ec17e6061d70d38d48b7c56ce448063f35 | test/Driver/output-file-is-dir.c | test/Driver/output-file-is-dir.c | // XFAIL: hexagon
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir/a.out
// RUN: cd %t.dir && not %clang %s
// RUN: test -d %t.dir/a.out
// REQUIRES: shell
int main() { return 0; }
| // RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir
// RUN: not %clang %s -c -emit-llvm -o %t.dir
// RUN: test -d %t.dir
int main() { return 0; }
| Simplify test so that it is more portable. | Simplify test so that it is more portable.
I have checked that the test still fails when the "|| !P.isRegularFile()" from
the original patch is removed.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@179464 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
605ec1ec715d3c33b54152e1797b4241b2c3ef89 | DigitRecognizerSDK/BNNSHelpers.h | DigitRecognizerSDK/BNNSHelpers.h | //
// BNNSHelpers.h
// NumberPad
//
// Created by Bridger Maxwell on 9/1/16.
// Copyright © 2016 Bridger Maxwell. All rights reserved.
//
#include <Accelerate/Accelerate.h>
BNNSFilterParameters createEmptyBNNSFilterParameters();
| //
// BNNSHelpers.h
// NumberPad
//
// Created by Bridger Maxwell on 9/1/16.
// Copyright © 2016 Bridger Maxwell. All rights reserved.
//
@import Accelerate;
BNNSFilterParameters createEmptyBNNSFilterParameters();
| Fix intermittent build error about non-modular header. | Fix intermittent build error about non-modular header.
| C | apache-2.0 | bridger/NumberPad,bridger/NumberPad,bridger/NumberPad |
be0d3253f7e2ca4fc4912df8021c32b171ce4bc7 | src/dirutils.h | src/dirutils.h | /*
* Copyright (c) 2012 Kyle Isom <kyle@tyrfingr.is>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE ... | /*
* Copyright (c) 2012 Kyle Isom <kyle@tyrfingr.is>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE ... | Include guard reflects the new project name. | Include guard reflects the new project name.
The old include guards were an artifact of the presence of this
code in another project before it was split out.
| C | isc | kisom/libdirutils,kisom/libdirutils |
4492babe6ef32033f3e664b99873f8a5ea1dd052 | src/dynamite.c | src/dynamite.c | /* $Id$ */
#include "libdynamite.h"
#include <stdio.h>
#define FCLOSE(file) if (file) { fclose(file); file = NULL; }
typedef struct _Cookie
{
FILE* input_file;
FILE* output_file;
} Cookie;
static size_t reader(void* buffer, size_t size, void* cookie)
{
return fread(buffer, 1, size, ((Cookie*)cookie)->input_... | /* $Id$ */
#include "libdynamite.h"
#include <stdio.h>
#include <stdlib.h>
#define FCLOSE(file) if (file) { fclose(file); file = NULL; }
typedef struct _Cookie
{
FILE* input_file;
FILE* output_file;
} Cookie;
static size_t reader(void* buffer, size_t size, void* cookie)
{
return fread(buffer, 1, size, ((Coo... | Allow a third parameter for offset | Allow a third parameter for offset
| C | mit | twogood/dynamite,twogood/dynamite |
6aa29c5cc51bc2018b76fd70c20c5f2621bf6853 | src/multithread.c | src/multithread.c | #include <stdlib.h>
#include <pthread.h>
#include "multithread.h"
mt_threads *mt_threads_create(unsigned nthreads)
{
mt_threads *threads = (mt_threads *) malloc(sizeof(mt_threads));
if (!threads)
return NULL;
threads->contexts = (mt_context *) malloc(sizeof(mt_context) * nthrea... | #include <stdlib.h>
#include <pthread.h>
#include "multithread.h"
#define THREAD_STACK_SIZE (256*1024)
mt_threads *mt_threads_create(unsigned nthreads)
{
mt_threads *threads = (mt_threads *) malloc(sizeof(mt_threads));
if (!threads)
return NULL;
threads->contexts = (mt_context... | Set thread stack size to 256K | Set thread stack size to 256K
| C | bsd-3-clause | calmh/ClusteredPoller,calmh/ClusteredPoller |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.