commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
7b30aba561165ee173059cd3a65c732bd5bc9056 | UIKitExtensions/UIView/Sizing.h | UIKitExtensions/UIView/Sizing.h | //
// UIView+Sizing.h
// aaah
//
// Created by Stanislaw Pankevich on 5/10/13.
// Copyright (c) 2013 IProjecting. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (Sizing)
@property CGPoint origin;
@property CGSize size;
@property CGFloat x;
@property CGFloat y;
@property CGFloat height;
@property CGFloat width;
@property CGFloat centerX;
@property CGFloat centerY;
@end
| // Inspired by FrameAccessor
// https://github.com/AlexDenisov/FrameAccessor/
#import <UIKit/UIKit.h>
@interface UIView (Sizing)
@property CGPoint origin;
@property CGSize size;
@property CGFloat x;
@property CGFloat y;
@property CGFloat height;
@property CGFloat width;
@property CGFloat centerX;
@property CGFloat centerY;
@end
| Add a note about FrameAccessor | Add a note about FrameAccessor
| C | mit | stanislaw/UIKitExtensions,stanislaw/UIKitExtensions,stanislaw/UIKitExtensions,stanislaw/UIKitExtensions |
dc336ecfd14b0b5007ea43faa780650030fa47ae | os/winapi/alloc.c | os/winapi/alloc.c | //
// os/winapi/alloc.h: Low-level WinAPI-based allocators.
//
// CEN64: Cycle-Accurate Nintendo 64 Simulator.
// Copyright (C) 2014, Tyler J. Stachecki.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "os/common/alloc.h"
#include <stddef.h>
#include <windows.h>
// Allocates a block of (R/W/X) memory.
void *cen64_alloc(struct cen64_mem *m, size_t size, bool exec) {
int access = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
if ((m->ptr = VirtualAlloc(NULL, size,
MEM_COMMIT | MEM_RESERVE, access)) == NULL)
return NULL;
m->size = size;
return m->ptr;
}
// Releases resources acquired by cen64_alloc_init.
void cen64_alloc_cleanup(void) {
}
// Initializes CEN64's low-level allocator.
int cen64_alloc_init(void) {
return 0;
}
// Releases resources acquired by cen64_alloc.
void cen64_free(struct cen64_mem *m) {
VirtualFree(m->ptr, m->size, MEM_RELEASE);
}
| //
// os/winapi/alloc.h: Low-level WinAPI-based allocators.
//
// CEN64: Cycle-Accurate Nintendo 64 Simulator.
// Copyright (C) 2014, Tyler J. Stachecki.
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "os/common/alloc.h"
#include <stddef.h>
#include <windows.h>
// Allocates a block of (R/W/X) memory.
void *cen64_alloc(struct cen64_mem *m, size_t size, bool exec) {
int access = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
if ((m->ptr = VirtualAlloc(NULL, size,
MEM_COMMIT | MEM_RESERVE, access)) == NULL)
return NULL;
m->size = size;
return m->ptr;
}
// Releases resources acquired by cen64_alloc_init.
void cen64_alloc_cleanup(void) {
}
// Initializes CEN64's low-level allocator.
int cen64_alloc_init(void) {
return 0;
}
// Releases resources acquired by cen64_alloc.
void cen64_free(struct cen64_mem *m) {
VirtualFree(m->ptr, 0, MEM_RELEASE);
}
| Fix a WinAPI VirtualFree bug. | Fix a WinAPI VirtualFree bug.
Thanks go out to izy for this commit.
| C | bsd-3-clause | tj90241/cen64,tj90241/cen64 |
cacf3b0c49e4f63a8753493def5e51ac027e7350 | src/ESPasyncJson.h | src/ESPasyncJson.h | // ESPasyncJson.h
/*
Async Response to use with arduinoJson and asyncwebserver
Written by Andrew Melvin (SticilFace) with help from me-no-dev and BBlanchon.
example of callback in use
server.on("/json", HTTP_ANY, [](AsyncWebServerRequest * request) {
AsyncJsonResponse * response = new AsyncJsonResponse();
JsonObject& root = response->getRoot();
root["key1"] = "key number one";
JsonObject& nested = root.createNestedObject("nested");
nested["key1"] = "key number one";
response->setLength();
request->send(response);
});
*/
#pragma once
#include <ArduinoJson.h>
/*
* Json Response
* */
class ChunkPrint : public Print{
private:
uint8_t* _destination;
size_t _to_skip;
size_t _to_write;
size_t _pos;
public:
ChunkPrint(uint8_t* destination, size_t from, size_t len)
: _destination(destination), _to_skip(from), _to_write(len), _pos{0} {}
size_t write(uint8_t c){
if (_to_skip > 0) {
_to_skip--;
return 0;
} else if (_to_write > 0) {
_to_write--;
_destination[_pos++] = c;
return 1;
}
return 0;
}
};
class AsyncJsonResponse: public AsyncAbstractResponse {
private:
DynamicJsonBuffer _jsonBuffer;
JsonVariant _root;
bool _isValid;
public:
AsyncJsonResponse(): _isValid{false} {
_code = 200;
_contentType = "text/json";
_root = _jsonBuffer.createObject();
}
~AsyncJsonResponse() {}
JsonVariant & getRoot() { return _root; }
bool _sourceValid() { return _isValid; }
bool setLength() {
_contentLength = _root.measureLength();
if (_contentLength) { _isValid = true; }
}
size_t _fillBuffer(uint8_t *data, size_t len){
ChunkPrint dest(data, _sentLength, len);
_root.printTo( dest ) ;
return len;
}
}; | Add header to extend server for arduinojson | Add header to extend server for arduinojson
| C | lgpl-2.1 | Adam5Wu/ESPAsyncWebServer,Adam5Wu/ESPAsyncWebServer |
|
e27afdfbe608809f3a7961bc980e2183540c9214 | src/main.h | src/main.h | #pragma once
#include <unistd.h>
#include <algorithm>
#include <exception>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>
const std::string BotVersion ("3.0.0-devel");
const unsigned int BotVersionNum = 2800; | #pragma once
#include <unistd.h>
#include <algorithm>
#include <cstdarg>
#include <exception>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>
const std::string BotVersion ("3.0.0-devel");
const unsigned int BotVersionNum = 2800; | Update includes with stuff I'll need | Update includes with stuff I'll need
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
ed97a4dfa37019c451d53f7c0ad945504c41a17d | BlackJack/src/Game.h | BlackJack/src/Game.h | /*
* Game.h
*
* Created on: 30.12.2016
* Author: Stefan
*/
#include "Deck.h"
#include "Dealer.h"
#include <memory>
#include "GlobalDeclarations.h"
#include "PlayerStrategy.h"
#ifndef GAME_H_
#define GAME_H_
// Class game is the glue code which binds all other classes together.
// It guides the game.
class Game {
using pPlayer = std::unique_ptr<Player>;
public:
Game () : _deck(), _dealer(_deck), _players() {}
// Not allowed to copy or assign game
Game(Game const &) = delete ;
void operator=(Game const&) = delete;
void AddDecks();
void PlayRound();
void GetStartCards();
void PlayCards();
void Evaluate();
void PutCardsBack();
void RemoveBrokePlayers();
void PrintNumPlayers () const;
virtual void SetWagers() = 0;
virtual bool PlayAnotherRound () const = 0;
protected:
virtual ~Game(){}; // Not allowed to polymorphic delete derivatives
Deck _deck;
Dealer _dealer;
// Players are pointers to avoid issues with card pointers
std::vector<pPlayer> _players;
};
#endif /* GAME_H_ */
| /*
* Game.h
*
* Created on: 30.12.2016
* Author: Stefan
*/
#include "Deck.h"
#include "Dealer.h"
#include <memory>
#include "GlobalDeclarations.h"
#include "PlayerStrategy.h"
#ifndef GAME_H_
#define GAME_H_
// Class game is the glue code which binds all other classes together.
// It guides the game.
class Game {
using pPlayer = std::unique_ptr<Player>;
public:
Game () : _deck(), _dealer(_deck), _players() {}
// Not allowed to copy or assign game
Game(Game const &) = delete ;
void operator=(Game const&) = delete;
void AddDecks();
void PlayRound();
virtual bool PlayAnotherRound () const = 0;
void PrintNumPlayers () const;
protected:
virtual ~Game(){}; // Not allowed to polymorphic delete derivatives
virtual void SetWagers() = 0;
Deck _deck;
Dealer _dealer;
// Players are pointers to avoid issues with card pointers
std::vector<pPlayer> _players;
private:
void GetStartCards();
void PlayCards();
void Evaluate();
void PutCardsBack();
void RemoveBrokePlayers();
};
#endif /* GAME_H_ */
| Move functions in correct sectors in game class. | Move functions in correct sectors in game class.
| C | mit | saccharios/BlackJack,saccharios/BlackJack,saccharios/BlackJack |
6490f5fb931aa08df00017cb19a08456cd0cdc5b | tests/stream_redirector.h | tests/stream_redirector.h | #include <libmesh/libmesh.h>
/**
* This class uses RAII to control redirecting the libMesh::err stream
* to NULL and restoring it around some operation where we do not want
* to see output to the screen.
*/
class StreamRedirector
{
public:
/**
* Constructor; saves the original libMesh::err streambuf.
*/
StreamRedirector()
: _errbuf(libMesh::err.rdbuf())
{
libMesh::err.rdbuf(libmesh_nullptr);
}
/**
* Destructor: restores the stream.
*/
~StreamRedirector()
{
libMesh::err.rdbuf(_errbuf);
}
private:
std::streambuf * _errbuf;
};
| Add StreamRedirector class to handle stream resetting with RAII. | Add StreamRedirector class to handle stream resetting with RAII.
| C | lgpl-2.1 | vikramvgarg/libmesh,balborian/libmesh,dschwen/libmesh,svallaghe/libmesh,hrittich/libmesh,vikramvgarg/libmesh,balborian/libmesh,pbauman/libmesh,capitalaslash/libmesh,roystgnr/libmesh,capitalaslash/libmesh,giorgiobornia/libmesh,giorgiobornia/libmesh,giorgiobornia/libmesh,balborian/libmesh,hrittich/libmesh,libMesh/libmesh,hrittich/libmesh,90jrong/libmesh,libMesh/libmesh,BalticPinguin/libmesh,BalticPinguin/libmesh,90jrong/libmesh,svallaghe/libmesh,hrittich/libmesh,dschwen/libmesh,vikramvgarg/libmesh,jwpeterson/libmesh,libMesh/libmesh,jwpeterson/libmesh,balborian/libmesh,vikramvgarg/libmesh,vikramvgarg/libmesh,roystgnr/libmesh,90jrong/libmesh,90jrong/libmesh,roystgnr/libmesh,giorgiobornia/libmesh,svallaghe/libmesh,roystgnr/libmesh,pbauman/libmesh,svallaghe/libmesh,vikramvgarg/libmesh,capitalaslash/libmesh,libMesh/libmesh,dschwen/libmesh,giorgiobornia/libmesh,90jrong/libmesh,svallaghe/libmesh,hrittich/libmesh,BalticPinguin/libmesh,jwpeterson/libmesh,capitalaslash/libmesh,svallaghe/libmesh,pbauman/libmesh,hrittich/libmesh,dschwen/libmesh,balborian/libmesh,roystgnr/libmesh,BalticPinguin/libmesh,roystgnr/libmesh,dschwen/libmesh,pbauman/libmesh,roystgnr/libmesh,capitalaslash/libmesh,giorgiobornia/libmesh,balborian/libmesh,jwpeterson/libmesh,balborian/libmesh,hrittich/libmesh,balborian/libmesh,libMesh/libmesh,hrittich/libmesh,libMesh/libmesh,BalticPinguin/libmesh,libMesh/libmesh,capitalaslash/libmesh,pbauman/libmesh,pbauman/libmesh,90jrong/libmesh,vikramvgarg/libmesh,svallaghe/libmesh,jwpeterson/libmesh,jwpeterson/libmesh,pbauman/libmesh,dschwen/libmesh,pbauman/libmesh,pbauman/libmesh,balborian/libmesh,svallaghe/libmesh,giorgiobornia/libmesh,svallaghe/libmesh,90jrong/libmesh,BalticPinguin/libmesh,90jrong/libmesh,vikramvgarg/libmesh,capitalaslash/libmesh,libMesh/libmesh,jwpeterson/libmesh,BalticPinguin/libmesh,jwpeterson/libmesh,giorgiobornia/libmesh,90jrong/libmesh,roystgnr/libmesh,capitalaslash/libmesh,giorgiobornia/libmesh,vikramvgarg/libmesh,dschwen/libmesh,BalticPinguin/libmesh,hrittich/libmesh,balborian/libmesh,dschwen/libmesh |
|
60ad6d206abc1aecef270e4ec6e37e51deebc3a6 | main.c | main.c | #include <stdio.h>
#include "aes.h"
int
main(int argc, char **argv)
{
aes_init();
return 0;
}
| #include <stdio.h>
#include <stdlib.h>
#include "aes.h"
int
main(int argc, char **argv)
{
long blocks;
char *nptr;
aes_init();
blocks = 10;
if (argc > 1)
{
long b = strtol(argv[1], &nptr, 10);
if (argv[1] != nptr)
{
blocks = b;
}
}
return 0;
}
| Allow specifying number of blocks to test | Allow specifying number of blocks to test
| C | bsd-2-clause | seankelly/aesni,seankelly/aesni |
f740bdd7dfea751bb9f7657ba58d44c4b2f5652d | src/core/SkTextFormatParams.h | src/core/SkTextFormatParams.h | /*
* Copyright 2010 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkTextFormatParams_DEFINES
#define SkTextFormatParams_DEFINES
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
// Fraction of the text size to lower a strike through line below the baseline.
#define kStdStrikeThru_Offset (-SK_Scalar1 * 6 / 21)
// Fraction of the text size to lower a underline below the baseline.
#define kStdUnderline_Offset (SK_Scalar1 / 9)
// Fraction of the text size to use for a strike through or under-line.
#define kStdUnderline_Thickness (SK_Scalar1 / 18)
// The fraction of text size to embolden fake bold text scales with text size.
// At 9 points or below, the stroke width is increased by text size / 24.
// At 36 points and above, it is increased by text size / 32. In between,
// it is interpolated between those values.
static const SkScalar kStdFakeBoldInterpKeys[] = {
SK_Scalar1*9,
SK_Scalar1*36,
};
static const SkScalar kStdFakeBoldInterpValues[] = {
SK_Scalar1/24,
SK_Scalar1/32,
};
static_assert(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == SK_ARRAY_COUNT(kStdFakeBoldInterpValues),
"mismatched_array_size");
static const int kStdFakeBoldInterpLength = SK_ARRAY_COUNT(kStdFakeBoldInterpKeys);
#endif //SkTextFormatParams_DEFINES
| /*
* Copyright 2010 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkTextFormatParams_DEFINES
#define SkTextFormatParams_DEFINES
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
// The fraction of text size to embolden fake bold text scales with text size.
// At 9 points or below, the stroke width is increased by text size / 24.
// At 36 points and above, it is increased by text size / 32. In between,
// it is interpolated between those values.
static const SkScalar kStdFakeBoldInterpKeys[] = {
SK_Scalar1*9,
SK_Scalar1*36,
};
static const SkScalar kStdFakeBoldInterpValues[] = {
SK_Scalar1/24,
SK_Scalar1/32,
};
static_assert(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == SK_ARRAY_COUNT(kStdFakeBoldInterpValues),
"mismatched_array_size");
static const int kStdFakeBoldInterpLength = SK_ARRAY_COUNT(kStdFakeBoldInterpKeys);
#endif //SkTextFormatParams_DEFINES
| Remove unused text format constants. | Remove unused text format constants.
A long time ago Skia used handle strike-thru and underlines as part of
the glyph masks. When it did so there were some overridable constants
for where they should go. Since this function has long since been
removed, remove these no longer used constants.
Change-Id: I8bc7dbe03e82a5d244438aaaeaf024d8c95280d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/477160
Commit-Queue: Ben Wagner <[email protected]>
Commit-Queue: Herb Derby <[email protected]>
Auto-Submit: Ben Wagner <[email protected]>
Reviewed-by: Herb Derby <[email protected]>
| C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia |
72939a4c9e1db029e42473a0b4e018c8e6f46cf8 | sql/sqlite/inc/TSQLiteRow.h | sql/sqlite/inc/TSQLiteRow.h | // @(#)root/sqlite:$Id$
// Author: o.freyermuth <[email protected]>, 01/06/2013
/*************************************************************************
* Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TPgSQLRow
#define ROOT_TPgSQLRow
#ifndef ROOT_TSQLRow
#include "TSQLRow.h"
#endif
#if !defined(__CINT__)
#include <sqlite3.h>
#else
struct sqlite3_stmt;
#endif
class TSQLiteRow : public TSQLRow {
private:
sqlite3_stmt *fResult; // current result set
Bool_t IsValid(Int_t field);
public:
TSQLiteRow(void *result, ULong_t rowHandle);
~TSQLiteRow();
void Close(Option_t *opt="");
ULong_t GetFieldLength(Int_t field);
const char *GetField(Int_t field);
ClassDef(TSQLiteRow,0) // One row of SQLite query result
};
#endif
| // @(#)root/sqlite:
// Author: o.freyermuth <[email protected]>, 01/06/2013
/*************************************************************************
* Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TSQLiteRow
#define ROOT_TSQLiteRow
#ifndef ROOT_TSQLRow
#include "TSQLRow.h"
#endif
#if !defined(__CINT__)
#include <sqlite3.h>
#else
struct sqlite3_stmt;
#endif
class TSQLiteRow : public TSQLRow {
private:
sqlite3_stmt *fResult; // current result set
Bool_t IsValid(Int_t field);
public:
TSQLiteRow(void *result, ULong_t rowHandle);
~TSQLiteRow();
void Close(Option_t *opt="");
ULong_t GetFieldLength(Int_t field);
const char *GetField(Int_t field);
ClassDef(TSQLiteRow,0) // One row of SQLite query result
};
#endif
| Fix fatal typo in code guard | Fix fatal typo in code guard
| C | lgpl-2.1 | arch1tect0r/root,zzxuanyuan/root-compressor-dummy,davidlt/root,BerserkerTroll/root,Y--/root,omazapa/root-old,vukasinmilosevic/root,sawenzel/root,gbitzes/root,sbinet/cxx-root,omazapa/root-old,arch1tect0r/root,simonpf/root,zzxuanyuan/root,gbitzes/root,omazapa/root-old,dfunke/root,zzxuanyuan/root-compressor-dummy,esakellari/root,omazapa/root,esakellari/my_root_for_test,0x0all/ROOT,sirinath/root,esakellari/my_root_for_test,bbockelm/root,Duraznos/root,georgtroska/root,thomaskeck/root,vukasinmilosevic/root,dfunke/root,esakellari/my_root_for_test,smarinac/root,krafczyk/root,mkret2/root,zzxuanyuan/root,simonpf/root,root-mirror/root,sawenzel/root,abhinavmoudgil95/root,gbitzes/root,omazapa/root,abhinavmoudgil95/root,Duraznos/root,nilqed/root,buuck/root,sbinet/cxx-root,mattkretz/root,jrtomps/root,gbitzes/root,bbockelm/root,beniz/root,root-mirror/root,vukasinmilosevic/root,zzxuanyuan/root-compressor-dummy,CristinaCristescu/root,gbitzes/root,krafczyk/root,Y--/root,agarciamontoro/root,krafczyk/root,Y--/root,lgiommi/root,omazapa/root,mkret2/root,mattkretz/root,BerserkerTroll/root,gbitzes/root,zzxuanyuan/root,sbinet/cxx-root,0x0all/ROOT,satyarth934/root,zzxuanyuan/root,abhinavmoudgil95/root,esakellari/root,Duraznos/root,abhinavmoudgil95/root,root-mirror/root,omazapa/root,gbitzes/root,agarciamontoro/root,gganis/root,bbockelm/root,evgeny-boger/root,karies/root,mattkretz/root,simonpf/root,BerserkerTroll/root,perovic/root,buuck/root,root-mirror/root,gganis/root,abhinavmoudgil95/root,zzxuanyuan/root-compressor-dummy,perovic/root,omazapa/root-old,smarinac/root,omazapa/root-old,jrtomps/root,nilqed/root,mhuwiler/rootauto,sbinet/cxx-root,pspe/root,evgeny-boger/root,olifre/root,nilqed/root,CristinaCristescu/root,mhuwiler/rootauto,omazapa/root,karies/root,CristinaCristescu/root,abhinavmoudgil95/root,sawenzel/root,krafczyk/root,lgiommi/root,arch1tect0r/root,gganis/root,jrtomps/root,smarinac/root,esakellari/my_root_for_test,evgeny-boger/root,pspe/root,smarinac/root,mhuwiler/rootauto,omazapa/root-old,georgtroska/root,beniz/root,mkret2/root,evgeny-boger/root,olifre/root,nilqed/root,CristinaCristescu/root,gbitzes/root,0x0all/ROOT,zzxuanyuan/root-compressor-dummy,esakellari/root,mhuwiler/rootauto,Duraznos/root,zzxuanyuan/root-compressor-dummy,gganis/root,abhinavmoudgil95/root,olifre/root,thomaskeck/root,CristinaCristescu/root,pspe/root,krafczyk/root,jrtomps/root,georgtroska/root,mattkretz/root,simonpf/root,pspe/root,arch1tect0r/root,veprbl/root,lgiommi/root,davidlt/root,mkret2/root,beniz/root,georgtroska/root,mattkretz/root,zzxuanyuan/root,simonpf/root,sbinet/cxx-root,perovic/root,pspe/root,perovic/root,sirinath/root,arch1tect0r/root,evgeny-boger/root,jrtomps/root,simonpf/root,vukasinmilosevic/root,davidlt/root,georgtroska/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,beniz/root,smarinac/root,veprbl/root,BerserkerTroll/root,davidlt/root,georgtroska/root,zzxuanyuan/root,omazapa/root,sawenzel/root,arch1tect0r/root,perovic/root,davidlt/root,georgtroska/root,lgiommi/root,olifre/root,abhinavmoudgil95/root,simonpf/root,olifre/root,krafczyk/root,pspe/root,agarciamontoro/root,veprbl/root,karies/root,satyarth934/root,omazapa/root,Y--/root,omazapa/root-old,lgiommi/root,lgiommi/root,pspe/root,veprbl/root,davidlt/root,pspe/root,Duraznos/root,satyarth934/root,vukasinmilosevic/root,simonpf/root,nilqed/root,dfunke/root,bbockelm/root,gbitzes/root,agarciamontoro/root,mattkretz/root,Y--/root,buuck/root,zzxuanyuan/root,jrtomps/root,karies/root,root-mirror/root,olifre/root,satyarth934/root,root-mirror/root,Y--/root,esakellari/my_root_for_test,jrtomps/root,evgeny-boger/root,perovic/root,jrtomps/root,georgtroska/root,BerserkerTroll/root,esakellari/my_root_for_test,mattkretz/root,buuck/root,esakellari/root,beniz/root,vukasinmilosevic/root,dfunke/root,karies/root,mkret2/root,veprbl/root,agarciamontoro/root,vukasinmilosevic/root,0x0all/ROOT,gganis/root,zzxuanyuan/root-compressor-dummy,sirinath/root,zzxuanyuan/root,sbinet/cxx-root,georgtroska/root,0x0all/ROOT,satyarth934/root,sirinath/root,karies/root,mkret2/root,davidlt/root,mhuwiler/rootauto,olifre/root,karies/root,karies/root,agarciamontoro/root,thomaskeck/root,zzxuanyuan/root,arch1tect0r/root,Y--/root,zzxuanyuan/root,lgiommi/root,veprbl/root,gbitzes/root,karies/root,CristinaCristescu/root,dfunke/root,karies/root,root-mirror/root,smarinac/root,agarciamontoro/root,sirinath/root,Duraznos/root,sawenzel/root,gganis/root,CristinaCristescu/root,pspe/root,karies/root,perovic/root,evgeny-boger/root,sirinath/root,lgiommi/root,agarciamontoro/root,dfunke/root,dfunke/root,mattkretz/root,omazapa/root-old,buuck/root,krafczyk/root,buuck/root,jrtomps/root,BerserkerTroll/root,esakellari/my_root_for_test,esakellari/my_root_for_test,gganis/root,pspe/root,omazapa/root,krafczyk/root,esakellari/my_root_for_test,sawenzel/root,root-mirror/root,mattkretz/root,agarciamontoro/root,sbinet/cxx-root,satyarth934/root,sirinath/root,thomaskeck/root,sirinath/root,0x0all/ROOT,smarinac/root,veprbl/root,simonpf/root,sbinet/cxx-root,BerserkerTroll/root,esakellari/root,arch1tect0r/root,veprbl/root,satyarth934/root,beniz/root,BerserkerTroll/root,thomaskeck/root,root-mirror/root,satyarth934/root,mhuwiler/rootauto,gganis/root,beniz/root,sbinet/cxx-root,beniz/root,Y--/root,satyarth934/root,esakellari/root,davidlt/root,dfunke/root,sawenzel/root,bbockelm/root,sawenzel/root,smarinac/root,mkret2/root,mattkretz/root,esakellari/root,BerserkerTroll/root,mhuwiler/rootauto,omazapa/root-old,arch1tect0r/root,nilqed/root,gganis/root,mkret2/root,omazapa/root,vukasinmilosevic/root,olifre/root,CristinaCristescu/root,olifre/root,0x0all/ROOT,thomaskeck/root,nilqed/root,agarciamontoro/root,0x0all/ROOT,veprbl/root,davidlt/root,root-mirror/root,buuck/root,gbitzes/root,perovic/root,abhinavmoudgil95/root,lgiommi/root,Duraznos/root,Y--/root,root-mirror/root,omazapa/root-old,pspe/root,nilqed/root,mhuwiler/rootauto,abhinavmoudgil95/root,mhuwiler/rootauto,esakellari/root,thomaskeck/root,perovic/root,dfunke/root,buuck/root,mhuwiler/rootauto,zzxuanyuan/root,lgiommi/root,bbockelm/root,nilqed/root,omazapa/root,lgiommi/root,mkret2/root,mkret2/root,evgeny-boger/root,jrtomps/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,sbinet/cxx-root,veprbl/root,mkret2/root,simonpf/root,krafczyk/root,Duraznos/root,sirinath/root,Y--/root,beniz/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,agarciamontoro/root,beniz/root,zzxuanyuan/root,bbockelm/root,perovic/root,omazapa/root-old,Y--/root,smarinac/root,arch1tect0r/root,CristinaCristescu/root,vukasinmilosevic/root,abhinavmoudgil95/root,davidlt/root,evgeny-boger/root,sawenzel/root,bbockelm/root,krafczyk/root,vukasinmilosevic/root,davidlt/root,arch1tect0r/root,thomaskeck/root,thomaskeck/root,simonpf/root,0x0all/ROOT,krafczyk/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,veprbl/root,omazapa/root,gganis/root,olifre/root,smarinac/root,sbinet/cxx-root,BerserkerTroll/root,georgtroska/root,esakellari/root,CristinaCristescu/root,dfunke/root,mhuwiler/rootauto,jrtomps/root,perovic/root,beniz/root,esakellari/root,buuck/root,sawenzel/root,Duraznos/root,vukasinmilosevic/root,CristinaCristescu/root,esakellari/root,sirinath/root,buuck/root,esakellari/my_root_for_test,bbockelm/root,buuck/root,Duraznos/root,gganis/root,bbockelm/root,olifre/root,thomaskeck/root,georgtroska/root,sawenzel/root,Duraznos/root,bbockelm/root,dfunke/root,nilqed/root,sirinath/root,nilqed/root,satyarth934/root,mattkretz/root |
69f10062ab629f12d111e538a4f1acb6d66327d4 | test/Driver/nozlibcompress.c | test/Driver/nozlibcompress.c | // REQUIRES: nozlib
// RUN: %clang -### -fintegrated-as -gz -c %s 2>&1 | FileCheck %s -check-prefix CHECK-WARN
// RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck -allow-empty -check-prefix CHECK-NOWARN %s
// CHECK-WARN: warning: cannot compress debug sections (zlib not installed)
// CHECK-NOWARN-NOT: warning: cannot compress debug sections (zlib not installed)
| // REQUIRES: !zlib
// RUN: %clang -### -fintegrated-as -gz -c %s 2>&1 | FileCheck %s -check-prefix CHECK-WARN
// RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck -allow-empty -check-prefix CHECK-NOWARN %s
// CHECK-WARN: warning: cannot compress debug sections (zlib not installed)
// CHECK-NOWARN-NOT: warning: cannot compress debug sections (zlib not installed)
| Replace 'REQUIRES: nozlib' with '!zlib' because we don't need two ways to say the same thing. | Replace 'REQUIRES: nozlib' with '!zlib' because we don't need two ways
to say the same thing.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@360452 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang |
a7d34e88287ab77caa99d58092c66da92546a10a | ReactLocalization.h | ReactLocalization.h | //
// The MIT License (MIT)
//
// Copyright (c) 2015 Stefano Falda ([email protected])
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#import <Foundation/Foundation.h>
#import <UIKit/UIDevice.h>
#import "RCTBridgeModule.h"
#import "RCTLog.h"
@interface ReactLocalization : NSObject<RCTBridgeModule>
@end
| //
// The MIT License (MIT)
//
// Copyright (c) 2015 Stefano Falda ([email protected])
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#import <Foundation/Foundation.h>
#import <UIKit/UIDevice.h>
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#import "RCTLog.h"
#else
#import <React/RCTBridgeModule.h>
#import <React/RCTLog.h>
#endif
@interface ReactLocalization : NSObject<RCTBridgeModule>
@end
| Change headers for react-native 0.40 compatibility | Change headers for react-native 0.40 compatibility
| C | mit | stefalda/ReactNativeLocalization,stefalda/ReactNativeLocalization,stefalda/ReactNativeLocalization,stefalda/ReactNativeLocalization |
9ba97cce3773e59677346e66484dbdc5c80f26a6 | test/main.c | test/main.c | #include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv[1]);
unsigned int i, j;
// Output in Netscape cookies.txt format
for (i = 0; i < bc->num_pages; i++) {
for (j = 0; j < bc->pages[i]->number_of_cookies; j++) {
// domain, flag, path, secure, expiration, name, value
printf("%s\t%s\t%s\t%s\t%.f\t%s\t%s\n",
bc->pages[i]->cookies[j]->domain,
bc->pages[i]->cookies[j]->domain[0] == '.' ? "TRUE" : "FALSE",
bc->pages[i]->cookies[j]->path,
binarycookies_is_secure(bc->pages[i]->cookies[j]) ? "TRUE" : "FALSE",
bc->pages[i]->cookies[j]->expiration_date,
bc->pages[i]->cookies[j]->name,
bc->pages[i]->cookies[j]->value);
}
}
binarycookies_free(bc);
return 0;
}
| #include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv[1]);
unsigned int i, j;
// Output in Netscape cookies.txt format
for (i = 0; i < bc->num_pages; i++) {
for (j = 0; j < bc->pages[i]->number_of_cookies; j++) {
// domain, flag, path, secure, expiration, name, value
printf("%s\t%s\t%s\t%s\t%.f\t%s\t%s\n",
bc->pages[i]->cookies[j]->domain,
binarycookies_domain_access_full(bc->pages[i]->cookies[j]) ? "TRUE" : "FALSE",
bc->pages[i]->cookies[j]->path,
binarycookies_is_secure(bc->pages[i]->cookies[j]) ? "TRUE" : "FALSE",
bc->pages[i]->cookies[j]->expiration_date,
bc->pages[i]->cookies[j]->name,
bc->pages[i]->cookies[j]->value);
}
}
binarycookies_free(bc);
return 0;
}
| Use macro in example code | Use macro in example code
| C | mit | Tatsh/libbinarycookies,Tatsh/libbinarycookies |
92bbf5c179d533c93c19a51a62770cf5392a95a5 | t/04-nativecall/04-pointers.c | t/04-nativecall/04-pointers.c | #include <stdio.h>
#include <string.h>
#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif
DLLEXPORT void * ReturnSomePointer()
{
char *x = "Got passed back the pointer I returned";
return x;
}
DLLEXPORT int CompareSomePointer(void *ptr)
{
int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
return x;
}
DLLEXPORT void * ReturnNullPointer()
{
return NULL;
}
DLLEXPORT void * TakeTwoPointersToInt(int *ptr1, int *ptr2)
{
return NULL;
}
DLLEXPORT void * TakeCArrayToInt8(int array[]) {
return NULL;
}
| #include <stdio.h>
#include <string.h>
#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT extern
#endif
DLLEXPORT void * ReturnSomePointer()
{
return strdup("Got passed back the pointer I returned");
}
DLLEXPORT int CompareSomePointer(void *ptr)
{
int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
free(ptr);
return x;
}
DLLEXPORT void * ReturnNullPointer()
{
return NULL;
}
DLLEXPORT void * TakeTwoPointersToInt(int *ptr1, int *ptr2)
{
return NULL;
}
DLLEXPORT void * TakeCArrayToInt8(int array[]) {
return NULL;
}
| Fix C issue in NativeCall tests. | Fix C issue in NativeCall tests.
One of the pointer tests returned a pointer to astack allocated string outside
of the function, which is not very safe. Replace it with a strdup()ed string
that's freed on verification.
| C | artistic-2.0 | ab5tract/rakudo,b2gills/rakudo,niner/rakudo,nbrown/rakudo,sergot/rakudo,cygx/rakudo,samcv/rakudo,rakudo/rakudo,lucasbuchala/rakudo,raydiak/rakudo,b2gills/rakudo,niner/rakudo,niner/rakudo,salortiz/rakudo,rakudo/rakudo,Gnouc/rakudo,softmoth/rakudo,paultcochrane/rakudo,zostay/rakudo,tony-o/rakudo,nunorc/rakudo,cygx/rakudo,ungrim97/rakudo,dankogai/rakudo,salortiz/rakudo,zostay/rakudo,sergot/rakudo,usev6/rakudo,sjn/rakudo,MasterDuke17/rakudo,salortiz/rakudo,MasterDuke17/rakudo,ab5tract/rakudo,cognominal/rakudo,LLFourn/rakudo,ab5tract/rakudo,samcv/rakudo,Gnouc/rakudo,jonathanstowe/rakudo,ungrim97/rakudo,awwaiid/rakudo,tbrowder/rakudo,Leont/rakudo,labster/rakudo,rakudo/rakudo,tony-o/rakudo,salortiz/rakudo,softmoth/rakudo,zhuomingliang/rakudo,labster/rakudo,samcv/rakudo,samcv/rakudo,cygx/rakudo,cognominal/rakudo,sjn/rakudo,jonathanstowe/rakudo,labster/rakudo,jonathanstowe/rakudo,Gnouc/rakudo,ugexe/rakudo,skids/rakudo,laben/rakudo,nbrown/rakudo,awwaiid/rakudo,sjn/rakudo,azawawi/rakudo,LLFourn/rakudo,tony-o/rakudo,nunorc/rakudo,laben/rakudo,Gnouc/rakudo,cygx/rakudo,Leont/rakudo,sergot/rakudo,usev6/rakudo,labster/rakudo,ugexe/rakudo,b2gills/rakudo,paultcochrane/rakudo,MasterDuke17/rakudo,jonathanstowe/rakudo,raydiak/rakudo,skids/rakudo,azawawi/rakudo,MasterDuke17/rakudo,nbrown/rakudo,awwaiid/rakudo,tbrowder/rakudo,laben/rakudo,paultcochrane/rakudo,nunorc/rakudo,paultcochrane/rakudo,ab5tract/rakudo,dankogai/rakudo,zhuomingliang/rakudo,jonathanstowe/rakudo,cognominal/rakudo,lucasbuchala/rakudo,paultcochrane/rakudo,MasterDuke17/rakudo,azawawi/rakudo,dankogai/rakudo,labster/rakudo,rakudo/rakudo,tbrowder/rakudo,lucasbuchala/rakudo,dankogai/rakudo,sjn/rakudo,ugexe/rakudo,nbrown/rakudo,usev6/rakudo,usev6/rakudo,rakudo/rakudo,salortiz/rakudo,ugexe/rakudo,sjn/rakudo,cygx/rakudo,LLFourn/rakudo,rakudo/rakudo,Gnouc/rakudo,skids/rakudo,LLFourn/rakudo,cognominal/rakudo,Leont/rakudo,ungrim97/rakudo,tony-o/rakudo,nbrown/rakudo,awwaiid/rakudo,cognominal/rakudo,samcv/rakudo,niner/rakudo,Leont/rakudo,tbrowder/rakudo,tbrowder/rakudo,softmoth/rakudo,sergot/rakudo,softmoth/rakudo,tony-o/rakudo,salortiz/rakudo,nunorc/rakudo,zhuomingliang/rakudo,laben/rakudo,b2gills/rakudo,lucasbuchala/rakudo,ab5tract/rakudo,awwaiid/rakudo,nbrown/rakudo,skids/rakudo,usev6/rakudo,zostay/rakudo,zhuomingliang/rakudo,b2gills/rakudo,MasterDuke17/rakudo,raydiak/rakudo,skids/rakudo,lucasbuchala/rakudo,Gnouc/rakudo,dankogai/rakudo,LLFourn/rakudo,tbrowder/rakudo,labster/rakudo,azawawi/rakudo,raydiak/rakudo,softmoth/rakudo,ugexe/rakudo,ungrim97/rakudo,tony-o/rakudo,zostay/rakudo,azawawi/rakudo,ungrim97/rakudo |
a089ce29161267cca724bf76ad98602e90b30178 | tests/test_utils.h | tests/test_utils.h | /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <libcellml>
#include "test_exportdefinitions.h"
std::string TEST_EXPORT resourcePath(const std::string &resourceRelativePath = "");
std::string TEST_EXPORT fileContents(const std::string &fileName);
void TEST_EXPORT printErrors(const libcellml::Validator &v);
void TEST_EXPORT printErrors(const libcellml::Parser &p);
void TEST_EXPORT expectEqualErrors(const std::vector<std::string> &errors, const libcellml::Logger &logger);
libcellml::ModelPtr TEST_EXPORT createModel(const std::string &name = "");
libcellml::ModelPtr TEST_EXPORT createModelWithComponent(const std::string &name = "");
#define EXPECT_EQ_ERRORS(errors, logger) SCOPED_TRACE("Error occured here");expectEqualErrors(errors, logger)
| /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <libcellml>
#include "test_exportdefinitions.h"
std::string TEST_EXPORT resourcePath(const std::string &resourceRelativePath = "");
std::string TEST_EXPORT fileContents(const std::string &fileName);
void TEST_EXPORT printErrors(const libcellml::Validator &v);
void TEST_EXPORT printErrors(const libcellml::Parser &p);
void TEST_EXPORT expectEqualErrors(const std::vector<std::string> &errors, const libcellml::Logger &logger);
libcellml::ModelPtr TEST_EXPORT createModel(const std::string &name = "");
libcellml::ModelPtr TEST_EXPORT createModelWithComponent(const std::string &name = "");
#define EXPECT_EQ_ERRORS(errors, logger) SCOPED_TRACE("Error occured here.");expectEqualErrors(errors, logger)
| Add fullstop for the pc crowd (punctually correct). | Add fullstop for the pc crowd (punctually correct).
| C | apache-2.0 | cellml/libcellml,hsorby/libcellml,nickerso/libcellml,nickerso/libcellml,cellml/libcellml,nickerso/libcellml,hsorby/libcellml,cellml/libcellml,cellml/libcellml,MichaelClerx/libcellml,hsorby/libcellml,hsorby/libcellml,MichaelClerx/libcellml,MichaelClerx/libcellml,nickerso/libcellml |
e92cbeac89d4c7b228894a9b8eb37e3ac51afe73 | drivers/net/ixgbe/ixgbe_fcoe.h | drivers/net/ixgbe/ixgbe_fcoe.h | /*******************************************************************************
Intel 10 Gigabit PCI Express Linux driver
Copyright(c) 1999 - 2009 Intel Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information:
e1000-devel Mailing List <[email protected]>
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*******************************************************************************/
#ifndef _IXGBE_FCOE_H
#define _IXGBE_FCOE_H
#include <scsi/fc/fc_fcoe.h>
/* shift bits within STAT fo FCSTAT */
#define IXGBE_RXDADV_FCSTAT_SHIFT 4
/* ddp user buffer */
#define IXGBE_BUFFCNT_MAX 256 /* 8 bits bufcnt */
#define IXGBE_FCPTR_ALIGN 16
#define IXGBE_FCPTR_MAX (IXGBE_BUFFCNT_MAX * sizeof(dma_addr_t))
#define IXGBE_FCBUFF_4KB 0x0
#define IXGBE_FCBUFF_8KB 0x1
#define IXGBE_FCBUFF_16KB 0x2
#define IXGBE_FCBUFF_64KB 0x3
#define IXGBE_FCBUFF_MAX 65536 /* 64KB max */
#define IXGBE_FCBUFF_MIN 4096 /* 4KB min */
#define IXGBE_FCOE_DDP_MAX 512 /* 9 bits xid */
/* fcerr */
#define IXGBE_FCERR_BADCRC 0x00100000
struct ixgbe_fcoe_ddp {
int len;
u32 err;
unsigned int sgc;
struct scatterlist *sgl;
dma_addr_t udp;
unsigned long *udl;
};
struct ixgbe_fcoe {
spinlock_t lock;
struct pci_pool *pool;
struct ixgbe_fcoe_ddp ddp[IXGBE_FCOE_DDP_MAX];
};
#endif /* _IXGBE_FCOE_H */
| Add FCoE feature header to 82599 | ixgbe: Add FCoE feature header to 82599
This adds the FCoE feature header ixgbe_fcoe.h to 82599. This header includes
the defines and structures required by the ixgbe driver to support various
offload features in 82599 for Fiber Channel over Ethernet (FCoE). These offloads
features include Fiber Channel CRC calculation, FCoE SOF/EOF auto insertion,
FCoE Sequence Offload (FSO) for large send, and Direct Data Placement (DDP)
for large receive.
Signed-off-by: Yi Zou <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs |
|
7b731e9071b09adedb44d097a3ae7c04488e345c | NSTimeZone+Offset.h | NSTimeZone+Offset.h | //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
| //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
/*! Creates and returns a time zone with the specified offset.
* The string is broken down into the hour and minute components
* which are then used to work out the number of seconds from GMT.
* \param offset The timezone offset as a string such as "+0100"
* \return A time zone with the specified offset
* \see +timeZoneForSecondsFromGMT:
*/
+ (id)timeZoneWithStringOffset:(NSString*)offset;
/*! Returns the receivers offset as an HHMM formatted string.
* \return The receivers offset as a string in HHMM format.
*/
- (NSString*)offsetString;
@end
| Add documentation of the category methods on NSTimeZone | Add documentation of the category methods on NSTimeZone
| C | mit | geoffgarside/cocoagit,geoffgarside/cocoagit,schacon/cocoagit,schacon/cocoagit |
b2dcde40c7dc565e51210b1fd505a3f7368bec23 | panda/src/audio/audio.h | panda/src/audio/audio.h | // Filename: audio.h
// Created by: frang (06Jul00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef __AUDIO_H__
#define __AUDIO_H__
#include "filterProperties.h"
#include "audioSound.h"
#include "audioManager.h"
#endif /* __AUDIO_H__ */
| // Filename: audio.h
// Created by: frang (06Jul00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef __AUDIO_H__
#define __AUDIO_H__
#include "filterProperties.h"
#include "audioLoadRequest.h"
#include "audioSound.h"
#include "audioManager.h"
#endif /* __AUDIO_H__ */
| Apply patch by Josh Enes | Apply patch by Josh Enes
| C | bsd-3-clause | mgracer48/panda3d,Wilee999/panda3d,brakhane/panda3d,jjkoletar/panda3d,jjkoletar/panda3d,tobspr/panda3d,jjkoletar/panda3d,Wilee999/panda3d,grimfang/panda3d,brakhane/panda3d,brakhane/panda3d,tobspr/panda3d,hj3938/panda3d,matthiascy/panda3d,brakhane/panda3d,hj3938/panda3d,jjkoletar/panda3d,ee08b397/panda3d,tobspr/panda3d,matthiascy/panda3d,chandler14362/panda3d,mgracer48/panda3d,ee08b397/panda3d,Wilee999/panda3d,matthiascy/panda3d,brakhane/panda3d,hj3938/panda3d,matthiascy/panda3d,chandler14362/panda3d,hj3938/panda3d,chandler14362/panda3d,mgracer48/panda3d,hj3938/panda3d,matthiascy/panda3d,Wilee999/panda3d,grimfang/panda3d,Wilee999/panda3d,mgracer48/panda3d,ee08b397/panda3d,grimfang/panda3d,grimfang/panda3d,chandler14362/panda3d,chandler14362/panda3d,mgracer48/panda3d,Wilee999/panda3d,matthiascy/panda3d,cc272309126/panda3d,hj3938/panda3d,ee08b397/panda3d,chandler14362/panda3d,brakhane/panda3d,cc272309126/panda3d,brakhane/panda3d,tobspr/panda3d,matthiascy/panda3d,tobspr/panda3d,grimfang/panda3d,jjkoletar/panda3d,mgracer48/panda3d,jjkoletar/panda3d,cc272309126/panda3d,jjkoletar/panda3d,tobspr/panda3d,cc272309126/panda3d,cc272309126/panda3d,hj3938/panda3d,hj3938/panda3d,chandler14362/panda3d,brakhane/panda3d,mgracer48/panda3d,grimfang/panda3d,grimfang/panda3d,ee08b397/panda3d,tobspr/panda3d,ee08b397/panda3d,jjkoletar/panda3d,cc272309126/panda3d,tobspr/panda3d,ee08b397/panda3d,grimfang/panda3d,grimfang/panda3d,chandler14362/panda3d,ee08b397/panda3d,jjkoletar/panda3d,tobspr/panda3d,matthiascy/panda3d,Wilee999/panda3d,chandler14362/panda3d,Wilee999/panda3d,cc272309126/panda3d,ee08b397/panda3d,cc272309126/panda3d,Wilee999/panda3d,chandler14362/panda3d,matthiascy/panda3d,grimfang/panda3d,tobspr/panda3d,hj3938/panda3d,mgracer48/panda3d,brakhane/panda3d,cc272309126/panda3d,mgracer48/panda3d |
9cf087465ffee40dbe4657dc2e8ffeb63eeb53e9 | Synchronized/ObjCSynchronized.h | Synchronized/ObjCSynchronized.h | // The MIT License (MIT)
//
// Copyright (c) 2014-present James Ide
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
void objc_synchronized(id object, __attribute__((noescape)) void (^closure)());
| // The MIT License (MIT)
//
// Copyright (c) 2014-present James Ide
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
void objc_synchronized(id object, __attribute__((noescape)) void (^closure)());
NS_ASSUME_NONNULL_END
| Use NS_ASSUME_NONNULL_BEGIN/END macros in Obj-C header | Use NS_ASSUME_NONNULL_BEGIN/END macros in Obj-C header
The mutex object and block shouldn't be null. We could change the API to accept null but I don't think that's natural to do (and the Swift API forbids it anyway right now).
| C | mit | ide/Synchronized,ide/Synchronized |
5560daf0cbabab65b07476ca16285012a4f6489e | src/util/tmpfile.c | src/util/tmpfile.c | #define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
tmpdir = "/tmp";
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
if(fd < 0){
free(tmppath);
tmppath = NULL;
}
if(fname)
*fname = tmppath;
else
free(tmppath);
return fd;
}
| #define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
tmpdir = "/tmp";
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
if(fname)
*fname = tmppath;
else
free(tmppath);
return fd;
}
| Revert "Free tmppath on mkstemp() failure" (moved to master) | Revert "Free tmppath on mkstemp() failure" (moved to master)
This reverts commit 85598a0ccbea2d82303c5cb2daa9a29ec01eb3d2.
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
dd54e6b9aded46da7a74eede6f935b289a979912 | WidgetTimeInput.h | WidgetTimeInput.h | /**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#include <utility/BlynkDateTime.h>
class TimeInputParam
{
public:
TimeInputParam(const BlynkParam& param)
: mStart (param[0].asLong())
, mStop (param[1].asLong())
{
mTZ = param[2].asLong();
}
BlynkDateTime& getStart() { return mStart; }
BlynkDateTime& getStop() { return mStop; }
long getTZ() const { return mTZ; }
private:
BlynkDateTime mStart;
BlynkDateTime mStop;
long mTZ;
};
#endif
| /**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#include <utility/BlynkDateTime.h>
class TimeInputParam
{
public:
TimeInputParam(const BlynkParam& param)
{
if (strlen(param[0].asStr())) {
mStart = param[0].asLong();
}
if (strlen(param[1].asStr())) {
mStop = param[1].asLong();
}
mTZ = param[2].asLong();
}
BlynkTime& getStart() { return mStart; }
BlynkTime& getStop() { return mStop; }
long getTZ() const { return mTZ; }
private:
BlynkTime mStart;
BlynkTime mStop;
long mTZ;
};
#endif
| Switch to Time instead of DateTime | Switch to Time instead of DateTime
| C | mit | ivankravets/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library |
c078961dce97d0126188b1d3df96f9af8fd2f00f | projects/com.oracle.truffle.llvm.test/tests/c/truffle-c/inlineTest/inline0.c | projects/com.oracle.truffle.llvm.test/tests/c/truffle-c/inlineTest/inline0.c | int foo(int a, int b, int c) {
int arr[5] = { 1, 2, 3, 4, 5 };
int d = 4;
int *p = &d;
return a + b + c + arr[4] + arr[0] + *p;
}
int main() {
int a, b, c;
a = 2;
b = 1;
c = 3;
int d = 4;
int *p = &d;
int i;
for (i = 0; i < 1234567; i++) {
*p = foo(a, b, c);
}
return *p;
}
| int foo(int a, int b, int c) {
int arr[5] = { 1, 2, 3, 4, 5 };
int d = 4;
int *p = &d;
return a + b + c + arr[4] + arr[0] + *p;
}
int main() {
int a, b, c;
a = 2;
b = 1;
c = 3;
int d = 4;
int *p = &d;
int i;
for (i = 0; i < 12345; i++) {
*p = foo(a, b, c);
}
return *p;
}
| Reduce the loop iteration count in test case to reduce the execution time | Reduce the loop iteration count in test case to reduce the execution time
| C | bsd-3-clause | crbb/sulong,PrinzKatharina/sulong,lxp/sulong,lxp/sulong,PrinzKatharina/sulong,PrinzKatharina/sulong,crbb/sulong,PrinzKatharina/sulong,crbb/sulong,crbb/sulong,lxp/sulong,lxp/sulong |
faa2c3b0b4ff1b4d90d897aa15b90b58ce4bdbb6 | Classes/LVTFolder.h | Classes/LVTFolder.h | //
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (nonatomic) LVTColorLabel colorLabel;
@property (readonly, nonatomic, copy) NSString *path;
@property (readonly, nonatomic, copy) NSURL *fileURL;
@property (readonly, nonatomic) NSDate *dateUpdated;
@property (readonly, nonatomic) NSDate *dateDeleted;
@property (readonly, nonatomic, copy) NSString *md5;
@property (readonly, nonatomic, copy) NSURL *url;
@property (readonly, nonatomic, copy) NSURL *shortURL;
@property (readonly, nonatomic, copy) NSString *organizationPermalink;
@property (readonly, nonatomic, copy) NSArray *folders;
@property (readonly, nonatomic, copy) NSArray *files;
@end
| //
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (nonatomic) LVTColorLabel colorLabel;
@property (readonly, nonatomic, copy) NSString *path;
@property (readonly, nonatomic, copy) NSURL *fileURL;
@property (nonatomic) NSDate *dateUpdated;
@property (readonly, nonatomic) NSDate *dateDeleted;
@property (readonly, nonatomic, copy) NSString *md5;
@property (readonly, nonatomic, copy) NSURL *url;
@property (readonly, nonatomic, copy) NSURL *shortURL;
@property (readonly, nonatomic, copy) NSString *organizationPermalink;
@property (readonly, nonatomic, copy) NSArray *folders;
@property (readonly, nonatomic, copy) NSArray *files;
@end
| Allow us to edit this | Allow us to edit this | C | mit | layervault/LayerVaultAPI.objc |
9576c668aea5e0008311950e32c5d03fe496582e | libqiprog/include/qiprog_usb.h | libqiprog/include/qiprog_usb.h | /*
* qiprog - Reference implementation of the QiProg protocol
*
* Copyright (C) 2013 Alexandru Gagniuc <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef __QIPROG_USB_H
#define __QIPROG_USB_H
#include <qiprog.h>
/**
* @brief QiProg USB control request types for Control transfers
*
* @note
* Note that all values transferred over the bus, including those in wValue,
* wIndex and wLength fields, are LE coded! (The host side API likely translates
* wLength automatically if necessary, but maybe not wValue and wIndex, and
* certainly not the data. Check that your bytes are not swapped.)
*/
enum qiprog_usb_ctrl_req_type {
QIPROG_GET_CAPABILITIES = 0x00,
QIPROG_SET_BUS = 0x01,
QIPROG_SET_CLOCK = 0x02,
QIPROG_READ_DEVICE_ID = 0x03,
QIPROG_SET_ADDRESS = 0x04,
QIPROG_SET_ERASE_SIZE = 0x05,
QIPROG_SET_ERASE_COMMAND = 0x06,
QIPROG_SET_WRITE_COMMAND = 0x07,
QIPROG_SET_SPI_TIMING = 0x20,
QIPROG_READ8 = 0x30,
QIPROG_READ16 = 0x31,
QIPROG_READ32 = 0x32,
QIPROG_WRITE8 = 0x33,
QIPROG_WRITE16 = 0x34,
QIPROG_WRITE32 = 0x35,
QIPROG_SET_VDD = 0xf0,
};
#endif /* __QIPROG_USB_H */
| Add USB control request definitions | Add USB control request definitions
Add definitions for the bRequest values in QiProg USB control transactions.
Signed-off-by: Alexandru Gagniuc <[email protected]>
| C | mit | mrnuke/qiprog |
|
ad83a4669be1681f314f54eee728d69543f9caa4 | sw/device/lib/dif/dif_pinmux.c | sw/device/lib/dif/dif_pinmux.c | // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.
// This just exists to check that the header compiles for now. The actual
// implementation is work in progress.
| // Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/base/bitfield.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.
// This just exists to check that the header compiles for now. The actual
// implementation is work in progress.
OT_WARN_UNUSED_RESULT
dif_result_t dif_pinmux_input_select(const dif_pinmux_t *pinmux,
dif_pinmux_index_t peripheral_input,
dif_pinmux_index_t insel) {
if (pinmux == NULL || peripheral_input >= PINMUX_PARAM_N_MIO_PERIPH_IN ||
insel >= (2 + PINMUX_PARAM_N_MIO_PADS)) {
return kDifBadArg;
}
uint32_t reg_offset =
PINMUX_MIO_PERIPH_INSEL_0_REG_OFFSET + (peripheral_input << 2);
uint32_t reg_value =
bitfield_field32_write(0, PINMUX_MIO_PERIPH_INSEL_0_IN_0_FIELD, insel);
mmio_region_write32(pinmux->base_addr, reg_offset, reg_value);
return kDifOk;
}
| Add DIF to set pinmux insel | [sw/pinmux] Add DIF to set pinmux insel
Signed-off-by: Alexander Williams <[email protected]>
| C | apache-2.0 | lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan |
f99f3f4944bb8973899bffc52040c19bb31b6119 | test/CFrontend/exact-div-expr.c | test/CFrontend/exact-div-expr.c | // RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
int test(int *A, int *B) {
return A-B;
}
| // RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
long long test(int *A, int *B) {
return A-B;
}
| Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes. | Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@40451 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm |
6c7885a58e1d1202fbad71e09d423f8d637e25f8 | cc1/tests/test011.c | cc1/tests/test011.c | /*
name: TEST011
description: Basic test for goto
output:
F1
G1 F1 main
{
-
L2
j L3
yI #I1
L4
yI #I0
L3
L5
j L4
yI #I1
}
*/
#line 1
int
main() {
start:
goto next;
return 1;
success:
return 0;
next:
foo:
goto success;
return 1;
}
| Add baisc test for goto | Add baisc test for goto
| C | mit | 8l/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/scc,8l/scc,k0gaMSX/kcc,8l/scc,k0gaMSX/scc |
|
ffeaf8d4204a555cb95858839378f36d0c5cc69e | VENCore/VENCore.h | VENCore/VENCore.h | @import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
extern NSString *const VENErrorDomainCore;
typedef NS_ENUM(NSInteger, VENCoreErrorCode) {
VENCoreErrorCodeNoDefaultCore,
VENCoreErrorCodeNoAccessToken
};
@interface VENCore : NSObject
@property (strong, nonatomic) VENHTTP *httpClient;
@property (strong, nonatomic) NSString *accessToken;
/**
* Sets the shared core object.
* @param core The core object to share.
*/
+ (void)setDefaultCore:(VENCore *)core;
/**
* Returns the shared core object.
* @return A VENCore object.
*/
+ (instancetype)defaultCore;
/**
* Sets the core object's access token.
*/
- (void)setAccessToken:(NSString *)accessToken;
@end
| @import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
#import <VENCore/NSArray+VENCore.h>
#import <VENCore/NSDictionary+VENCore.h>
#import <VENCore/NSError+VENCore.h>
#import <VENCore/NSString+VENCore.h>
#import <VENCore/UIDevice+VENCore.h>
extern NSString *const VENErrorDomainCore;
typedef NS_ENUM(NSInteger, VENCoreErrorCode) {
VENCoreErrorCodeNoDefaultCore,
VENCoreErrorCodeNoAccessToken
};
@interface VENCore : NSObject
@property (strong, nonatomic) VENHTTP *httpClient;
@property (strong, nonatomic) NSString *accessToken;
/**
* Sets the shared core object.
* @param core The core object to share.
*/
+ (void)setDefaultCore:(VENCore *)core;
/**
* Returns the shared core object.
* @return A VENCore object.
*/
+ (instancetype)defaultCore;
/**
* Sets the core object's access token.
*/
- (void)setAccessToken:(NSString *)accessToken;
@end
| Add formerly private headers to the umbrella header | Add formerly private headers to the umbrella header
| C | mit | venmo/VENCore |
20fa76952f07ba3538e7528444bdbf17a5433099 | c_solutions_1-10/Euler_4.c | c_solutions_1-10/Euler_4.c | #include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
size_t int_len = snprintf(product, MAX, "%d", canidate);
int head = 0, tail = int_len - 1;
for (;head < tail && product[head] == product[tail]; head++, tail--)
;
if (head > tail && canidate > high)
high = canidate;
}
}
float stop = timeit();
printf("Answer: %d\n", high);
printf("Time: %.8f\n", stop - start);
return 0;
}
| #include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
if (canidate < high)
continue;
size_t int_len = snprintf(product, MAX, "%d", canidate);
int head = 0, tail = int_len - 1;
for (;head < tail && product[head] == product[tail]; head++, tail--)
;
if (head > tail)
high = canidate;
}
}
float stop = timeit();
printf("Answer: %d\n", high);
printf("Time: %.8f\n", stop - start);
return 0;
}
| Test against high before palindrome check down to ~0.01 | Test against high before palindrome check down to ~0.01
| C | mit | tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler |
c09fa15de38e00b487e7aa07ba65882d3cb9d635 | src/c/lib/colors.h | src/c/lib/colors.h | /*
* Copyright (c) 2016 Jan Hoffmann
*
* 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/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define COLOR_WINDOW_FOREGROUND GColorBlack
#define COLOR_WINDOW_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorLightGray,GColorWhite)
#define COLOR_LAYER_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorBlack,GColorWhite)
#define COLOR_LAYER_PROGRESS_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorBlack)
#define COLOR_WINDOW_ERROR_BACKGROUND PBL_IF_COLOR_ELSE(GColorCobaltBlue,GColorBlack)
#define COLOR_WINDOW_ERROR_FOREGROUND GColorWhite
#define COLOR_MENU_NORMAL_BACKGROUND GColorWhite
#define COLOR_MENU_NORMAL_FOREGROUND GColorBlack
#define COLOR_MENU_HIGHLIGHT_BACKGROUND PBL_IF_COLOR_ELSE(GColorDarkGray,GColorBlack)
#define COLOR_MENU_HIGHLIGHT_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorWhite)
| /*
* Copyright (c) 2016 Jan Hoffmann
*
* 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/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define COLOR_WINDOW_FOREGROUND GColorBlack
#define COLOR_WINDOW_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorLightGray,GColorWhite)
#define COLOR_LAYER_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorBlack,GColorWhite)
#define COLOR_LAYER_PROGRESS_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorBlack)
#define COLOR_WINDOW_ERROR_BACKGROUND PBL_IF_COLOR_ELSE(GColorCobaltBlue,GColorBlack)
#define COLOR_WINDOW_ERROR_FOREGROUND GColorWhite
#define COLOR_MENU_NORMAL_BACKGROUND GColorWhite
#define COLOR_MENU_NORMAL_FOREGROUND GColorBlack
#define COLOR_MENU_HIGHLIGHT_BACKGROUND PBL_IF_COLOR_ELSE(GColorCobaltBlue,GColorBlack)
#define COLOR_MENU_HIGHLIGHT_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorWhite)
| Change color of list selection to dark blue | Change color of list selection to dark blue
| C | mpl-2.0 | janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart,janh/mensa-stuttgart |
033dc1c92cf018d396e983d425b821dda420cfff | contrib/pg_xlogdump/rmgrdesc.c | contrib/pg_xlogdump/rmgrdesc.c | /*
* rmgrdesc.c
*
* pg_xlogdump resource managers definition
*
* contrib/pg_xlogdump/rmgrdesc.c
*/
#define FRONTEND 1
#include "postgres.h"
#include "access/clog.h"
#include "access/gin.h"
#include "access/gist_private.h"
#include "access/hash.h"
#include "access/heapam_xlog.h"
#include "access/multixact.h"
#include "access/nbtree.h"
#include "access/rmgr.h"
#include "access/spgist.h"
#include "access/xact.h"
#include "access/xlog_internal.h"
#include "catalog/storage_xlog.h"
#include "commands/dbcommands.h"
#include "commands/sequence.h"
#include "commands/tablespace.h"
#include "rmgrdesc.h"
#include "storage/standby.h"
#include "utils/relmapper.h"
#define PG_RMGR(symname,name,redo,desc,startup,cleanup,restartpoint) \
{ name, desc, },
const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
#include "access/rmgrlist.h"
};
| /*
* rmgrdesc.c
*
* pg_xlogdump resource managers definition
*
* contrib/pg_xlogdump/rmgrdesc.c
*/
#define FRONTEND 1
#include "postgres.h"
#include "access/clog.h"
#include "access/gin.h"
#include "access/gist_private.h"
#include "access/hash.h"
#include "access/heapam_xlog.h"
#include "access/multixact.h"
#include "access/nbtree.h"
#include "access/rmgr.h"
#include "access/spgist.h"
#include "access/xact.h"
#include "access/xlog_internal.h"
#include "catalog/storage_xlog.h"
#include "commands/dbcommands.h"
#include "commands/sequence.h"
#include "commands/tablespace.h"
#include "rmgrdesc.h"
#include "storage/standby.h"
#include "utils/relmapper.h"
#define PG_RMGR(symname,name,redo,desc,startup,cleanup) \
{ name, desc, },
const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
#include "access/rmgrlist.h"
};
| Fix compilation of pg_xlogdump, now that rm_safe_restartpoint is no more. | Fix compilation of pg_xlogdump, now that rm_safe_restartpoint is no more.
Oops. Pointed out by Andres Freund.
| C | mpl-2.0 | Postgres-XL/Postgres-XL,ovr/postgres-xl,oberstet/postgres-xl,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,ovr/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,zeroae/postgres-xl,techdragon/Postgres-XL,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,ovr/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,ashwinstar/gpdb,yazun/postgres-xl,zeroae/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,yazun/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,adam8157/gpdb,50wu/gpdb,xinzweb/gpdb,lisakowen/gpdb,lisakowen/gpdb,zeroae/postgres-xl,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,ovr/postgres-xl,50wu/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,jmcatamney/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ashwinstar/gpdb,adam8157/gpdb,adam8157/gpdb,50wu/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,ovr/postgres-xl,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,oberstet/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,adam8157/gpdb,adam8157/gpdb,xinzweb/gpdb,yazun/postgres-xl,greenplum-db/gpdb,jmcatamney/gpdb,yazun/postgres-xl,50wu/gpdb,zeroae/postgres-xl,50wu/gpdb,techdragon/Postgres-XL,jmcatamney/gpdb,lisakowen/gpdb,oberstet/postgres-xl |
fc7e29bc154d67f627274c657b4157132a1503e8 | src/auth/mycrypt.c | src/auth/mycrypt.c | #define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
#define _XOPEN_VERSION 4
#define _XPG4_2
#include <unistd.h>
#include "mycrypt.h"
char *mycrypt(const char *key, const char *salt)
{
return crypt(key, salt);
}
| #define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
#define _XOPEN_VERSION 4
#define _XPG4_2
#ifdef CRYPT_USE_XPG6
# define _XPG6 /* Some Solaris versions require this, some break with this */
#endif
#include <unistd.h>
#include "mycrypt.h"
char *mycrypt(const char *key, const char *salt)
{
return crypt(key, salt);
}
| Add _XPG6 macro if needed.. | Add _XPG6 macro if needed..
| C | mit | LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot |
c5b898743a202742847f9738382c9d928b0d8586 | arch/arm/core/aarch64/prep_c.c | arch/arm/core/aarch64/prep_c.c | /*
* Copyright (c) 2019 Carlo Caione <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until their
* initialization is performed.
*/
#include <kernel_internal.h>
extern FUNC_NORETURN void z_cstart(void);
/**
*
* @brief Prepare to and run C code
*
* This routine prepares for the execution of and runs C code.
*
* @return N/A
*/
void z_arm64_prep_c(void)
{
z_bss_zero();
z_arm64_interrupt_init();
z_cstart();
CODE_UNREACHABLE;
}
| /*
* Copyright (c) 2019 Carlo Caione <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until their
* initialization is performed.
*/
#include <kernel_internal.h>
#include <linker/linker-defs.h>
extern FUNC_NORETURN void z_cstart(void);
static inline void z_arm64_bss_zero(void)
{
uint64_t *p = (uint64_t *)__bss_start;
uint64_t *end = (uint64_t *)__bss_end;
while (p < end) {
*p++ = 0;
}
}
/**
*
* @brief Prepare to and run C code
*
* This routine prepares for the execution of and runs C code.
*
* @return N/A
*/
void z_arm64_prep_c(void)
{
z_arm64_bss_zero();
z_arm64_interrupt_init();
z_cstart();
CODE_UNREACHABLE;
}
| Fix alignment fault on z_bss_zero() | aarch64: Fix alignment fault on z_bss_zero()
Using newlibc with AArch64 is causing an alignement fault in
z_bss_zero() when the code is run on real hardware (on QEMU the problem
is not reproducible).
The main cause is that the memset() function exported by newlibc is
using 'DC ZVA' to zero out memory.
While this is often a nice optimization, this is causing the issue on
AArch64 because memset() is being used before the MMU is enabled, and
when the MMU is disabled all data accesses will be treated as
Device_nGnRnE.
This is a problem because quoting from the ARM reference manual: "If the
memory region being zeroed is any type of Device memory, then DC ZVA
generates an Alignment fault which is prioritized in the same way as
other alignment faults that are determined by the memory type".
newlibc tries to be a bit smart about this reading the DCZID_EL0
register before deciding whether using 'DC ZVA' or not. While this is a
good idea for code running in EL0, currently the Zephyr kernel is
running in EL1. This means that the value of the DCZID_EL0 register is
actually retrieved from the HCR_EL2.TDZ bit, that is always 0 because
EL2 is not currently supported / enabled. So the 'DC ZVA' instruction is
unconditionally used in the newlibc memset() implementation.
The "standard" solution for this case is usually to use a different
memset routine to be specifically used for two cases: (1) against IO
memory or (2) against normal memory but with MMU disabled (which means
all memory is considered device memory for data accesses).
To fix this issue in Zephyr we avoid calling memset() when clearing the
bss, and instead we use a simple loop to zero the memory region.
Signed-off-by: Carlo Caione <[email protected]>
| C | apache-2.0 | finikorg/zephyr,galak/zephyr,galak/zephyr,Vudentz/zephyr,nashif/zephyr,finikorg/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr |
6b95983e0c50bc24cb0bca433bd93d00d8de276f | src/eigen_qdebug.h | src/eigen_qdebug.h | #ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vector3f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "|" << vector.z() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Matrix4f &vector)
{
const Eigen::IOFormat cleanFormat(4, 0, ", ", "\n", "[", "]");
std::stringstream stream;
stream << vector.format(cleanFormat);
dbg << stream.str().c_str();
return dbg.maybeSpace();
}
#endif // SRC_EIGEN_QDEBUG_H_
| #ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vector3f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "|" << vector.z() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vector4f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "|" << vector.z() << "|"
<< vector.w() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Matrix4f &vector)
{
const Eigen::IOFormat cleanFormat(4, 0, ", ", "\n", "[", "]");
std::stringstream stream;
stream << vector.format(cleanFormat);
dbg << stream.str().c_str();
return dbg.maybeSpace();
}
#endif // SRC_EIGEN_QDEBUG_H_
| Add overload for qDebug << and Eigen::Vector4f. | Add overload for qDebug << and Eigen::Vector4f.
| C | mit | Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller |
34f3d3bba81d1714588ed7a0daf55d0b05a653f0 | src/common/halloc/src/macros.h | src/common/halloc/src/macros.h | /*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licenses/bsd-license.php
*/
#ifndef _LIBP_MACROS_H_
#define _LIBP_MACROS_H_
#include <stddef.h> /* offsetof */
/*
restore pointer to the structure by a pointer to its field
*/
#define structof(p,t,f) ((t*)(- offsetof(t,f) + (void*)(p)))
#endif
| /*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licenses/bsd-license.php
*/
#ifndef _LIBP_MACROS_H_
#define _LIBP_MACROS_H_
#include <stddef.h> /* offsetof */
#include <stdint.h> /* intptr_t */
/*
restore pointer to the structure by a pointer to its field
*/
#define structof(p,t,f) ((t*)(- offsetof(t,f) + (intptr_t)(p)))
#endif
| Fix pointer cast into integer type. | Fix pointer cast into integer type.
| C | apache-2.0 | fintler/tomatodb,fintler/tomatodb,fintler/tomatodb |
a502e4bfc8c3a016f764df0c4baf9987ba7af1de | src/config/mpich2.h | src/config/mpich2.h | #ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif
#ifndef ROMIO_VERSION
#include "mpich2io.h"
#endif /* !ROMIO_VERSION */
#endif /* !PyMPI_CONFIG_MPICH2_H */
| #ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#if !defined(MPICH2_NUMVERSION) || (MPICH2_NUMVERSION < 10100000)
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif /* MPICH2 < 1.1.0 */
#endif /* MS_WINDOWS */
#ifndef ROMIO_VERSION
#include "mpich2io.h"
#endif /* !ROMIO_VERSION */
#endif /* !PyMPI_CONFIG_MPICH2_H */
| Update for MPICH2 1.1 on Windows | Update for MPICH2 1.1 on Windows | C | bsd-2-clause | mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py |
c49c79960407e33d6ba47d5de0c78500cbf3205f | src/cpp2/expr_tok.h | src/cpp2/expr_tok.h | #ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus = '%',
tok_plus = '+',
tok_minus = '-',
tok_xor = '^',
tok_or = '|',
tok_and = '&',
tok_orsc = -1,
tok_andsc = -2,
tok_shiftl = -3,
tok_shiftr = -4,
/* unary - TODO */
tok_not = '!',
tok_bnot = '~',
/* comparison */
tok_eq = -5,
tok_ne = -6,
tok_le = -7,
tok_lt = '<',
tok_ge = -8,
tok_gt = '>',
/* ternary */
tok_question = '?',
tok_colon = ':',
#define MIN_OP -8
} tok_cur;
void tok_next(void);
void tok_begin(char *);
const char *tok_last(void);
#endif
| #ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_modulus = '%',
tok_plus = '+',
tok_minus = '-',
tok_xor = '^',
tok_or = '|',
tok_and = '&',
tok_orsc = -3,
tok_andsc = -4,
tok_shiftl = -5,
tok_shiftr = -6,
/* unary - TODO */
tok_not = '!',
tok_bnot = '~',
/* comparison */
tok_eq = -7,
tok_ne = -8,
tok_le = -9,
tok_lt = '<',
tok_ge = -10,
tok_gt = '>',
/* ternary */
tok_question = '?',
tok_colon = ':',
#define MIN_OP -10
} tok_cur;
void tok_next(void);
void tok_begin(char *);
const char *tok_last(void);
#endif
| Fix clash in cpp tokens | Fix clash in cpp tokens
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
208d638fa4fbf31ba83445861ad13c2e8c72e5f4 | include/llvm/Assembly/CWriter.h | include/llvm/Assembly/CWriter.h | //===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/CWriter library. This library
// is used to print C language files to an iostream.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ASSEMBLY_CWRITER_H
#define LLVM_ASSEMBLY_CWRITER_H
#include <iosfwd>
namespace llvm {
class Pass;
Pass *createWriteToCPass(std::ostream &o);
} // End llvm namespace
#endif
| //===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This functionality is implemented by the lib/CWriter library. This library
// is used to print C language files to an iostream.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ASSEMBLY_CWRITER_H
#define LLVM_ASSEMBLY_CWRITER_H
#include <iosfwd>
namespace llvm {
class PassManager;
void AddPassesToWriteC(PassManager &PM, std::ostream &o);
} // End llvm namespace
#endif
| Change access to the cwriter | Change access to the cwriter
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@11406 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap |
ac7ac74083f27b98aebc6c2a3d370c609f3e0df5 | libgnomeui/gnome-properties.h | libgnomeui/gnome-properties.h | #ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_READ,
GNOME_PROPERTY_WRITE,
GNOME_PROPERTY_APPLY,
GNOME_PROPERTY_SETUP
} GnomePropertyRequest;
GnomePropertyConfigurator
*gnome_property_configurator_new (void);
void gnome_property_configurator_destroy (GnomePropertyConfigurator *);
void gnome_property_configurator_register (GnomePropertyConfigurator *,
int (*callback)(GnomePropertyRequest));
void gnome_property_configurator_setup (GnomePropertyConfigurator *);
gint gnome_property_configurator_request (GnomePropertyConfigurator *,
GnomePropertyRequest);
void gnome_property_configurator_request_foreach (GnomePropertyConfigurator *th,
GnomePropertyRequest r);
END_GNOME_DECLS
#endif
| #ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GtkWidget *property_box;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_READ,
GNOME_PROPERTY_WRITE,
GNOME_PROPERTY_APPLY,
GNOME_PROPERTY_SETUP
} GnomePropertyRequest;
GnomePropertyConfigurator
*gnome_property_configurator_new (void);
void gnome_property_configurator_destroy (GnomePropertyConfigurator *);
void gnome_property_configurator_register (GnomePropertyConfigurator *,
int (*callback)(GnomePropertyRequest));
void gnome_property_configurator_setup (GnomePropertyConfigurator *);
gint gnome_property_configurator_request (GnomePropertyConfigurator *,
GnomePropertyRequest);
void gnome_property_configurator_request_foreach (GnomePropertyConfigurator *th,
GnomePropertyRequest r);
END_GNOME_DECLS
#endif
| Add a property box field so this stuff compiles | Add a property box field so this stuff compiles
| C | lgpl-2.1 | Distrotech/libgnomeui,Distrotech/libgnomeui,Distrotech/libgnomeui |
47ccf13ad405d2f0821b71eb3330c60ff209a172 | test2/inline/inline_addr_arg.c | test2/inline/inline_addr_arg.c | // RUN: %ocheck 3 %s
__attribute((always_inline))
inline f(int x)
{
int i = x;
&x;
i++;
return i;
}
main()
{
int added = 5;
added = f(2);
return added;
}
| Test for lvalue-argument function inlinling | Test for lvalue-argument function inlinling
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
|
af3145a1ba032338340c08d2c4922df2add97702 | tests/testParseNativeHCIDump.c | tests/testParseNativeHCIDump.c | #include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
static int UUID_SIZE = 16;
char toHexChar(int b) {
char c;
if(b < 10)
c = '0' + b;
else
c = 'A' + b - 10;
return c;
}
int main(int argc, char **argv) {
int b = (0xa4 & 0xf0) >> 4;
printf("c0=%c, %d\n", toHexChar(b), b);
b = (0xa4 & 0x0f);
printf("c1=%c, %d\n", toHexChar(b), b);
// The raw data from the manufacturer's data packate
uint8_t data[] = {0x4c,0x0,
0x2,0x15,
0xa4,0x95,0xde,0xad,0xc5,0xb1,0x4b,0x44,0xb5,
0x12,0x13,0x70,0xf0,0x2d,0x74,0xde,0x30,0x39,0xff,0xff,
0xc5};
// Get the manufacturer code from the first two octets
int index = 0;
int manufacturer = 256 * data[index++] + data[index++];
// Get the first octet of the beacon code
int code = 256 * data[index++] + data[index++];
// Get the proximity uuid
char uuid[UUID_SIZE+1];
int n;
for(n = 0; n < UUID_SIZE; n += 2, index ++) {
int b0 = (data[index] & 0xf0) >> 4;
int b1 = data[index] & 0x0f;
char c0 = toHexChar(b0);
char c1 = toHexChar(b1);
uuid[n] = c0;
uuid[n+1] = c1;
}
uuid[UUID_SIZE] = '\0';
// Get the beacon major id
int major = 256 * data[index++] + data[index++];
// Get the beacon minor id
int minor = 256 * data[index++] + data[index++];
// Get the transmitted power, which is encoded as the 2's complement of the calibrated Tx Power
int power = data[index] - 256;
printf("uuid=%s, manufacturer=%d, code=%d, major=%d, minor=%d, power=%d\n", uuid, manufacturer, code, major, minor, power);
} | Test the parse of the raw binary data seen in the hcidump integration for a manufacturer AD structure. | Test the parse of the raw binary data seen in the hcidump integration for a manufacturer AD structure.
| C | apache-2.0 | starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser |
|
8dbc6a0bccf04bb4d2cbc7a403c607641a2aaa25 | optional/capi/ext/proc_spec.c | optional/capi/ext/proc_spec.c | #include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(args) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
strcat(buffer, StringValuePtr(v));
strcat(buffer, "_");
}
buffer[strlen(buffer) - 1] = 0;
return rb_str_new2(buffer);
}
VALUE sp_underline_concat_proc(VALUE self) {
return rb_proc_new(concat_func, Qnil);
}
#endif
void Init_proc_spec() {
VALUE cls;
cls = rb_define_class("CApiProcSpecs", rb_cObject);
#ifdef HAVE_RB_PROC_NEW
rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0);
#endif
}
#ifdef __cplusplus
}
#endif
| #include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(val) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
strcat(buffer, StringValuePtr(v));
strcat(buffer, "_");
}
buffer[strlen(buffer) - 1] = 0;
return rb_str_new2(buffer);
}
VALUE sp_underline_concat_proc(VALUE self) {
return rb_proc_new(concat_func, Qnil);
}
#endif
void Init_proc_spec() {
VALUE cls;
cls = rb_define_class("CApiProcSpecs", rb_cObject);
#ifdef HAVE_RB_PROC_NEW
rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0);
#endif
}
#ifdef __cplusplus
}
#endif
| Revert "Fix typo in the commit a5312c77." | Revert "Fix typo in the commit a5312c77."
This reverts commit 401825d6045ab8e3bd1514404e7c326a045a92ae.
See the following revert for an explanation.
| C | mit | calavera/rubyspec,calavera/rubyspec |
e38845ec04ed22b4e2190695bd0395a90dcc1794 | lib/Common/ChakraCoreVersion.h | lib/Common/ChakraCoreVersion.h | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
#define CHAKRA_CORE_MAJOR_VERSION 1
#define CHAKRA_CORE_MINOR_VERSION 3
#define CHAKRA_CORE_VERSION_RELEASE 0
#define CHAKRA_CORE_VERSION_PRERELEASE 0
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0
#define CHAKRA_VERSION_RELEASE 0
// NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
| //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
#define CHAKRA_CORE_MAJOR_VERSION 1
#define CHAKRA_CORE_MINOR_VERSION 4
#define CHAKRA_CORE_VERSION_RELEASE 0
#define CHAKRA_CORE_VERSION_PRERELEASE 0
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0
#define CHAKRA_VERSION_RELEASE 0
// NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
| Update master branch version to 1.4 | Update master branch version to 1.4
| C | mit | mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore |
eadd77272d857d9478baaf94833210e9af5498ed | Engine/source/gfx/gl/tGL/tGL.h | Engine/source/gfx/gl/tGL/tGL.h | //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#ifndef T_GL_H
#define T_GL_H
#include "GL/glew.h"
// Slower but reliably detects extensions
#define gglHasExtension(EXTENSION) glewGetExtension("GL_" # EXTENSION)
#endif
| //-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#ifndef T_GL_H
#define T_GL_H
#include "GL/glew.h"
#if defined (TORQUE_OS_WIN)
// This doesn't work on Mesa drivers.
#define gglHasExtension(EXTENSION) GLEW_##EXTENSION
#else
// Slower but reliably detects extensions on Mesa.
#define gglHasExtension(EXTENSION) glewGetExtension("GL_" # EXTENSION)
#endif
#endif
| Add @Azaezel's exception for Win32 | Add @Azaezel's exception for Win32
"This chunk causes issues on the win8.1/non-SDL side."
| C | mit | Bloodknight/Torque3D,GarageGames/Torque3D,Will-of-the-Wisp/Torque3D,Azaezel/Torque3D,lukaspj/Speciality,chaigler/Torque3D,rextimmy/Torque3D,Azaezel/Torque3D,Azaezel/Torque3D,aaravamudan2014/Torque3D,John3/Torque3D,Will-of-the-Wisp/Torque3D,GarageGames/Torque3D,Will-of-the-Wisp/Torque3D,Bloodknight/Torque3D,Duion/Torque3D,Torque3D-GameEngine/Torque3D,aaravamudan2014/Torque3D,chaigler/Torque3D,Phantom139/Torque3D,Phantom139/Torque3D,rextimmy/Torque3D,lukaspj/Speciality,rextimmy/Torque3D,John3/Torque3D,Phantom139/Torque3D,rextimmy/Torque3D,elfprince13/Torque3D,Bloodknight/Torque3D,Bloodknight/Torque3D,ValtoGameEngines/Torque3D,elfprince13/Torque3D,ValtoGameEngines/Torque3D,GarageGames/Torque3D,Bloodknight/Torque3D,aaravamudan2014/Torque3D,Duion/Torque3D,John3/Torque3D,Torque3D-GameEngine/Torque3D,Torque3D-GameEngine/Torque3D,Torque3D-GameEngine/Torque3D,GarageGames/Torque3D,Will-of-the-Wisp/Torque3D,FITTeamIndecisive/Torque3D,aaravamudan2014/Torque3D,Bloodknight/Torque3D,chaigler/Torque3D,elfprince13/Torque3D,chaigler/Torque3D,JeffProgrammer/Torque3D,lukaspj/Speciality,elfprince13/Torque3D,Phantom139/Torque3D,Will-of-the-Wisp/Torque3D,Azaezel/Torque3D,Phantom139/Torque3D,John3/Torque3D,Torque3D-GameEngine/Torque3D,JeffProgrammer/Torque3D,Phantom139/Torque3D,lukaspj/Speciality,Duion/Torque3D,ValtoGameEngines/Torque3D,elfprince13/Torque3D,ValtoGameEngines/Torque3D,JeffProgrammer/Torque3D,ValtoGameEngines/Torque3D,GarageGames/Torque3D,Azaezel/Torque3D,John3/Torque3D,Azaezel/Torque3D,Torque3D-GameEngine/Torque3D,rextimmy/Torque3D,Will-of-the-Wisp/Torque3D,Torque3D-GameEngine/Torque3D,Phantom139/Torque3D,GarageGames/Torque3D,aaravamudan2014/Torque3D,aaravamudan2014/Torque3D,Azaezel/Torque3D,FITTeamIndecisive/Torque3D,lukaspj/Speciality,FITTeamIndecisive/Torque3D,John3/Torque3D,Will-of-the-Wisp/Torque3D,GarageGames/Torque3D,Bloodknight/Torque3D,JeffProgrammer/Torque3D,Will-of-the-Wisp/Torque3D,JeffProgrammer/Torque3D,FITTeamIndecisive/Torque3D,elfprince13/Torque3D,FITTeamIndecisive/Torque3D,Duion/Torque3D,chaigler/Torque3D,elfprince13/Torque3D,elfprince13/Torque3D,John3/Torque3D,Bloodknight/Torque3D,rextimmy/Torque3D,aaravamudan2014/Torque3D,Azaezel/Torque3D,Phantom139/Torque3D,JeffProgrammer/Torque3D,rextimmy/Torque3D,John3/Torque3D,aaravamudan2014/Torque3D,John3/Torque3D,FITTeamIndecisive/Torque3D,lukaspj/Speciality,rextimmy/Torque3D,Duion/Torque3D,chaigler/Torque3D,Azaezel/Torque3D,Bloodknight/Torque3D,Azaezel/Torque3D,GarageGames/Torque3D,Torque3D-GameEngine/Torque3D,Will-of-the-Wisp/Torque3D,ValtoGameEngines/Torque3D,aaravamudan2014/Torque3D,FITTeamIndecisive/Torque3D,Will-of-the-Wisp/Torque3D,Duion/Torque3D,ValtoGameEngines/Torque3D,ValtoGameEngines/Torque3D,rextimmy/Torque3D,Duion/Torque3D,GarageGames/Torque3D,FITTeamIndecisive/Torque3D,elfprince13/Torque3D,ValtoGameEngines/Torque3D,rextimmy/Torque3D,JeffProgrammer/Torque3D,chaigler/Torque3D,Phantom139/Torque3D,lukaspj/Speciality,Duion/Torque3D,Will-of-the-Wisp/Torque3D,lukaspj/Speciality,ValtoGameEngines/Torque3D,FITTeamIndecisive/Torque3D,Duion/Torque3D,Phantom139/Torque3D,lukaspj/Speciality,Torque3D-GameEngine/Torque3D,Duion/Torque3D,lukaspj/Speciality,FITTeamIndecisive/Torque3D,aaravamudan2014/Torque3D,chaigler/Torque3D,Torque3D-GameEngine/Torque3D,John3/Torque3D,JeffProgrammer/Torque3D,chaigler/Torque3D,elfprince13/Torque3D |
2b78b93cc76b65b4f388d29431f70112c784d78d | src/graph.h | src/graph.h | #ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
bool isEmpty() const;
void clear();
// structure
size_t addVertex();
void removeVertex(size_t index);
size_t vertexCount() const;
void addEdge(size_t a, size_t b);
void removeEdge(size_t a, size_t b);
void removeEdges();
void removeEdges(size_t index);
size_t edgeCount() const;
const std::vector<size_t>& neighbors(size_t index) const;
size_t degree(size_t index) const;
bool containsEdge(size_t a, size_t b) const;
private:
std::vector<std::vector<size_t> > m_adjacencyList;
};
} // end MolCore namespace
#endif // MOLCORE_GRAPH_H
| #ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
#include <cstddef>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
bool isEmpty() const;
void clear();
// structure
size_t addVertex();
void removeVertex(size_t index);
size_t vertexCount() const;
void addEdge(size_t a, size_t b);
void removeEdge(size_t a, size_t b);
void removeEdges();
void removeEdges(size_t index);
size_t edgeCount() const;
const std::vector<size_t>& neighbors(size_t index) const;
size_t degree(size_t index) const;
bool containsEdge(size_t a, size_t b) const;
private:
std::vector<std::vector<size_t> > m_adjacencyList;
};
} // end MolCore namespace
#endif // MOLCORE_GRAPH_H
| Include cstddef for size_t in newer GCC. | Include cstddef for size_t in newer GCC.
| C | bsd-3-clause | OpenChemistry/avogadrolibs,cjh1/mongochemweb-avogadrolibs,cjh1/mongochemweb-avogadrolibs,ghutchis/avogadrolibs,cjh1/mongochemweb-avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,wadejong/avogadrolibs,ghutchis/avogadrolibs,wadejong/avogadrolibs,wadejong/avogadrolibs,qust113/molcore,wadejong/avogadrolibs,ghutchis/avogadrolibs,qust113/molcore,ghutchis/avogadrolibs,cjh1/mongochemweb-avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs |
a6cdef764509c20d7b17f5bab2db0bf1f1f90f2d | md5.h | md5.h | /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* #if SIZEOF_UINT8 == 0 Can't get this from configure */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
/* #endif */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| /* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
| Add configure result checks on odbc, per Peter E. | Add configure result checks on odbc, per Peter E.
| C | lgpl-2.1 | gavioto/psqlodbc,hlinnaka/psqlodbc,treasure-data/prestogres-odbc,hlinnaka/psqlodbc,treasure-data/prestogres-odbc,Distrotech/psqlodbc,Distrotech/psqlodbc,hlinnaka/psqlodbc,treasure-data/prestogres-odbc,gavioto/psqlodbc,Distrotech/psqlodbc,gavioto/psqlodbc |
a3de6e9ab8fbd4c9462880dc5c138488b322efd0 | test/FrontendC/2003-08-21-WideString.c | test/FrontendC/2003-08-21-WideString.c | // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
// XFAIL: *
// See PR2452
struct {
int *name;
} syms = { L"NUL" };
| // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
#include <wchar.h>
struct {
wchar_t *name;
} syms = { L"NUL" };
| Fix a warning, closing PR2452 | Fix a warning, closing PR2452
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@52529 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm |
3dbd3e6015ae8e703633e1a362d05561dbde2566 | NSTimeZone+Offset.h | NSTimeZone+Offset.h | //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
| //
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
| Change NSTimeZone category to only import NSTimeZone parent class instead of Cocoa | Change NSTimeZone category to only import NSTimeZone parent class instead of Cocoa
| C | mit | schacon/cocoagit,schacon/cocoagit,geoffgarside/cocoagit,geoffgarside/cocoagit |
33e7f990e453efe202dde60ce3a2cb8609266a39 | src/parse/scanner.h | src/parse/scanner.h | #ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL \
int GENERATED::Scanner::lex(GENERATED::Parser::semantic_type *yylval, \
GENERATED::Parser::location_type *yylloc)
namespace GENERATED {
class Scanner : public yyFlexLexer {
public:
explicit Scanner(std::istream *in = nullptr,
std::ostream *out = nullptr);
int lex(GENERATED::Parser::semantic_type *yylval,
GENERATED::Parser::location_type *yylloc);
};
}
#endif // include-guard
| #ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL \
int GENERATED::Scanner::lex(GENERATED::Parser::semantic_type *yylval, \
GENERATED::Parser::location_type *yylloc)
// #define YY_DECL GENERATED::Parser::symbol_type GENERATED::Scanner::lex()
namespace GENERATED {
class Scanner : public yyFlexLexer {
public:
explicit Scanner(std::istream *in = nullptr, std::ostream *out = nullptr);
int lex(GENERATED::Parser::semantic_type *yylval,
GENERATED::Parser::location_type *yylloc);
// Parser::symbol_type lex();
};
}
#endif // include-guard
| Prepare for new lex interface | Prepare for new lex interface
| C | mit | laokaplow/tlc |
d2a07eee4c8fcc05e495a7a42295af294834c1b6 | ext/libxml/ruby_xml_node.h | ext/libxml/ruby_xml_node.h | /* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE
ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
void ruby_xml_node_free(xmlNodePtr xnode);
void ruby_xml_node_mark_common(xmlNodePtr xnode);
void ruby_init_xml_node(void);
VALUE check_string_or_symbol(VALUE val);
VALUE ruby_xml_node_child_set(VALUE self, VALUE obj);
VALUE ruby_xml_node_name_get(VALUE self);
VALUE ruby_xml_node_property_get(VALUE self, VALUE key);
VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val);
#endif
| /* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode);
VALUE check_string_or_symbol(VALUE val);
#endif
| Clean out needless declarations in the node.h header file. | Clean out needless declarations in the node.h header file.
| C | mit | increments/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,xml4r/libxml-ruby |
2fcadfe262e7574183c6cd1af5dbde2901f92275 | test/CodeGen/debug-info-vector.c | test/CodeGen/debug-info-vector.c | // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
typedef int v4si __attribute__((__vector_size__(16)));
v4si a;
// Test that we get an array type that's also a vector out of debug.
// CHECK: [ DW_TAG_array_type ] [line 0, size 128, align 128, offset 0] [vector] [from int]
| Add a test to make sure that vector output happens for debug info. | Add a test to make sure that vector output happens for debug info.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@171834 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,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-clang,apple/swift-clang,apple/swift-clang |
|
f461284a46bf073de958c65df190adaa331d80d3 | testmud/mud/include/game/paths.h | testmud/mud/include/game/paths.h | #include <config.h>
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define LIB_TIME (USR_DIR + "/Game/lib/time")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")
#define GAME_INITD (USR_DIR + "/Game/initd")
#define GAME_HELPD (USR_DIR + "/Game/sys/helpd")
#define GAME_DRIVER (USR_DIR + "/Game/sys/driver")
#define GAME_ROOT (USR_DIR + "/Game/sys/root")
#define GAME_SUBD (USR_DIR + "/Game/sys/subd")
#define GAME_TESTD (USR_DIR + "/Game/sys/testd")
| #include <config.h>
#define LIB_ACTION (USR_DIR + "/Game/lib/action")
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")
#define GAME_INITD (USR_DIR + "/Game/initd")
#define GAME_HELPD (USR_DIR + "/Game/sys/helpd")
#define GAME_DRIVER (USR_DIR + "/Game/sys/driver")
#define GAME_ROOT (USR_DIR + "/Game/sys/root")
#define GAME_SUBD (USR_DIR + "/Game/sys/subd")
#define GAME_TESTD (USR_DIR + "/Game/sys/testd")
| Remove unwritten time library, add action library | Remove unwritten time library, add action library
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
c7601bf508d348ccf30666254f762c8ee793c943 | 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 73
#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 74
#endif
| Update Skia milestone to 74 | Update Skia milestone to 74
Bug: skia:
Change-Id: Ief231cc48fd8a40bc10f21445884d599b27db799
Reviewed-on: https://skia-review.googlesource.com/c/186701
Reviewed-by: Heather Miller <[email protected]>
Commit-Queue: Heather Miller <[email protected]>
Auto-Submit: Heather Miller <[email protected]>
| C | bsd-3-clause | google/skia,google/skia,google/skia,google/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,google/skia |
f48347635a849159f8733fcce1ee630d1cc34493 | folly/detail/Singleton.h | folly/detail/Singleton.h | /*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <type_traits>
#include <folly/Traits.h>
namespace folly {
namespace detail {
struct DefaultTag {};
template <typename T>
struct DefaultMake {
struct Heap {
std::unique_ptr<T> ptr{std::make_unique<T>()};
/* implicit */ operator T&() {
return *ptr;
}
};
using is_returnable = StrictDisjunction<
bool_constant<__cplusplus >= 201703ULL>,
std::is_copy_constructible<T>,
std::is_move_constructible<T>>;
using type = std::conditional_t<is_returnable::value, T, Heap>;
T make(std::true_type) const {
return T();
}
Heap make(std::false_type) const {
return Heap();
}
type operator()() const {
return make(is_returnable{});
}
};
template <typename...>
struct TypeTuple {};
} // namespace detail
} // namespace folly
| /*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <type_traits>
#include <folly/Traits.h>
namespace folly {
namespace detail {
struct DefaultTag {};
template <typename T>
struct DefaultMake {
struct Heap {
std::unique_ptr<T> ptr{std::make_unique<T>()};
/* implicit */ operator T&() {
return *ptr;
}
};
using is_returnable = StrictDisjunction<
bool_constant<__cplusplus >= 201703ULL>,
std::is_copy_constructible<T>,
std::is_move_constructible<T>>;
using type = std::conditional_t<is_returnable::value, T, Heap>;
type operator()() const {
return type();
}
};
template <typename...>
struct TypeTuple {};
} // namespace detail
} // namespace folly
| Remove unnecessary verbosity in DefaultMake | Remove unnecessary verbosity in DefaultMake
Summary: [Folly] Remove unnecessary verbosity in `DefaultMake`. The shorter version does just as well.
Reviewed By: andriigrynenko
Differential Revision: D13254005
fbshipit-source-id: 6520b813685a4621d8679b7feda24a1a0b75cfd5
| C | apache-2.0 | facebook/folly,facebook/folly,facebook/folly,facebook/folly,facebook/folly |
46aaff03bcb8e5dd55a70eab7fb3aa50ef49b07a | src/wren_debug.h | src/wren_debug.h | //
// wren_debug.h
// wren
//
// Created by Bob Nystrom on 11/29/13.
// Copyright (c) 2013 Bob Nystrom. All rights reserved.
//
#ifndef wren_wren_debug_h
#define wren_wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstruction(WrenVM* vm, ObjFn* fn, int i);
void wrenDebugPrintCode(WrenVM* vm, ObjFn* fn);
void wrenDebugPrintStack(ObjFiber* fiber);
#endif
| #ifndef wren_debug_h
#define wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstruction(WrenVM* vm, ObjFn* fn, int i);
void wrenDebugPrintCode(WrenVM* vm, ObjFn* fn);
void wrenDebugPrintStack(ObjFiber* fiber);
#endif
| Clean up debug header preamble. | Clean up debug header preamble.
| C | mit | Nelarius/wren,Nelarius/wren,Nave-Neel/wren,munificent/wren,Nave-Neel/wren,Rohansi/wren,foresterre/wren,Nelarius/wren,Nelarius/wren,munificent/wren,munificent/wren,minirop/wren,minirop/wren,munificent/wren,bigdimboom/wren,bigdimboom/wren,Nave-Neel/wren,bigdimboom/wren,Nave-Neel/wren,Rohansi/wren,minirop/wren,foresterre/wren,foresterre/wren,foresterre/wren,minirop/wren,Rohansi/wren,munificent/wren,bigdimboom/wren,foresterre/wren,minirop/wren,munificent/wren,Nelarius/wren,Rohansi/wren |
621ef4c87b34fe0e6f1f945192820f0f2e655205 | UIforETW/Version.h | UIforETW/Version.h | #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.53f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
| #pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.54f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
// increment that won't trigger the new-version checks, handy for minor
// releases that I don't want to bother users about.
//#define VERSION_SUFFIX 'b'
| Increment version number to 1.54 | Increment version number to 1.54
| C | apache-2.0 | google/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW |
613871d124370ab208ed89e467a91faadf15dc1f | include/NDS-controller.h | include/NDS-controller.h | /*
* TODO add copyright notice and GPL licence thingey
*
*
*
*/
#include <nds.h>
#include <stdio.h>
#include <time.h>
#include <dswifi9.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define EMULATOR 1 //TODO automate flipping this in the makefile
/**
* Interactively lists WiFi connections, allow the user to select one and connect.
* Supports open connections and WEP secured ones.
*/
int ManualConnect(PrintConsole *top_screen, PrintConsole *bot_screen);
/**
* Connect using credentials in WFC bank.
* Writes output to supplied terminal, acts silently if none is provided.
*/
int WFCConnect(PrintConsole *console);
/**
* Standard keyboard callback placeholder
*/
void OnKeyPressed(int key);
/**
* Entry point of the application
*/
int main();
| Split the main file into .c and .h files to make breaking it up later easier. | Split the main file into .c and .h files to make breaking it up later easier.
| C | mit | Louisvh/NDS-controller |
|
0f3574df54fe9dc4e4d0a88a111f7787073af076 | Pod/Classes/DZVideoPlayerViewControllerConfiguration.h | Pod/Classes/DZVideoPlayerViewControllerConfiguration.h | //
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to NO
@property (strong, nonatomic) NSMutableArray *viewsToHideOnIdle; // has topToolbarView and bottomToolbarView by default
@property (assign, nonatomic) NSTimeInterval delayBeforeHidingViewsOnIdle; // defaults to 3 seconds
@property (assign, nonatomic) BOOL isShowFullscreenExpandAndShrinkButtonsEnabled; // defaults to YES
@property (assign, nonatomic) BOOL isHideControlsOnIdleEnabled; // defaults to YES
@end
| //
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to YES
@property (strong, nonatomic) NSMutableArray *viewsToHideOnIdle; // has topToolbarView and bottomToolbarView by default
@property (assign, nonatomic) NSTimeInterval delayBeforeHidingViewsOnIdle; // defaults to 3 seconds
@property (assign, nonatomic) BOOL isShowFullscreenExpandAndShrinkButtonsEnabled; // defaults to YES
@property (assign, nonatomic) BOOL isHideControlsOnIdleEnabled; // defaults to YES
@end
| Fix wrong comment in configuration | Fix wrong comment in configuration
| C | mit | MessuKilkain/DZVideoPlayerViewController,MessuKilkain/DZVideoPlayerViewController,MessuKilkain/DZVideoPlayerViewController |
32007a555cc2d10207e65a163f6ab809534d47e4 | compiler/cpp/src/parse/t_enum.h | compiler/cpp/src/parse/t_enum.h | // Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant objects with a name for the type.
*
* @author Mark Slee <[email protected]>
*/
class t_enum : public t_type {
public:
t_enum(t_program* program) :
t_type(program) {}
void set_name(std::string name) {
name_ = name;
}
void append(t_enum_value* constant) {
constants_.push_back(constant);
}
const std::vector<t_enum_value*>& get_constants() {
return constants_;
}
bool is_enum() const {
return true;
}
virtual std::string get_fingerprint_material() const {
return "enum";
}
private:
std::vector<t_enum_value*> constants_;
};
#endif
| // Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant objects with a name for the type.
*
* @author Mark Slee <[email protected]>
*/
class t_enum : public t_type {
public:
t_enum(t_program* program) :
t_type(program) {}
void set_name(const std::string& name) {
name_ = name;
}
void append(t_enum_value* constant) {
constants_.push_back(constant);
}
const std::vector<t_enum_value*>& get_constants() {
return constants_;
}
bool is_enum() const {
return true;
}
virtual std::string get_fingerprint_material() const {
return "enum";
}
private:
std::vector<t_enum_value*> constants_;
};
#endif
| Fix set_name compiler method signature | Fix set_name compiler method signature
Reviewed By: kholst
Other Notes: Follow up from 78130
git-svn-id: 8d8e29b1fb681c884914062b88f3633e3a187774@665434 13f79535-47bb-0310-9956-ffa450edef68
| C | apache-2.0 | JoeEnnever/thrift,authbox-lib/thrift,ijuma/thrift,collinmsn/thrift,authbox-lib/thrift,creker/thrift,3013216027/thrift,afds/thrift,alfredtofu/thrift,Jimdo/thrift,msonnabaum/thrift,theopolis/thrift,i/thrift,flandr/thrift,selaselah/thrift,Jimdo/thrift,prathik/thrift,bufferoverflow/thrift,tanmaykm/thrift,fernandobt8/thrift,wfxiang08/thrift,huahang/thrift,ykwd/thrift,chenbaihu/thrift,Jens-G/thrift,tanmaykm/thrift,SirWellington/thrift,lion117/lib-thrift,ijuma/thrift,zzmp/thrift,zhaorui1/thrift,pinterest/thrift,spicavigo/thrift,siemens/thrift,mway08/thrift,windofthesky/thrift,windofthesky/thrift,jeking3/thrift,strava/thrift,bmiklautz/thrift,zzmp/thrift,vashstorm/thrift,siemens/thrift,springheeledjak/thrift,bufferoverflow/thrift,jeking3/thrift,springheeledjak/thrift,bforbis/thrift,dongjiaqiang/thrift,NOMORECOFFEE/thrift,terminalcloud/thrift,msonnabaum/thrift,SuperAwesomeLTD/thrift,nsuke/thrift,dtmuller/thrift,evanweible-wf/thrift,creker/thrift,gadLinux/thrift,markerickson-wf/thrift,afds/thrift,gadLinux/thrift,yongju-hong/thrift,dcelasun/thrift,RobberPhex/thrift,creker/thrift,jeking3/thrift,dongjiaqiang/thrift,rewardStyle/apache.thrift,adamvduke/thrift-adamd,crisish/thrift,edvakf/thrift,bitfinder/thrift,Fitbit/thrift,ochinchina/thrift,afds/thrift,guodongxiaren/thrift,authbox-lib/thrift,msonnabaum/thrift,jackscott/thrift,ahnqirage/thrift,windofthesky/thrift,theopolis/thrift,i/thrift,wfxiang08/thrift,EasonYi/thrift,markerickson-wf/thrift,Fitbit/thrift,gadLinux/thrift,Sean-Der/thrift,reTXT/thrift,BluechipSystems/thrift,zhaorui1/thrift,Pertino/thrift,jeking3/thrift,terminalcloud/thrift,bufferoverflow/thrift,timse/thrift,vashstorm/thrift,koofr/thrift,msonnabaum/thrift,prathik/thrift,Jens-G/thrift,dcelasun/thrift,ijuma/thrift,BluechipSystems/thrift,flandr/thrift,hcorg/thrift,strava/thrift,flamholz/thrift,ykwd/thrift,eonezhang/thrift,yongju-hong/thrift,zhaorui1/thrift,roshan/thrift,bufferoverflow/thrift,akshaydeo/thrift,bgould/thrift,bgould/thrift,rewardStyle/apache.thrift,3013216027/thrift,bforbis/thrift,SirWellington/thrift,msonnabaum/thrift,roshan/thrift,mindcandy/thrift,reTXT/thrift,koofr/thrift,bholbrook73/thrift,prashantv/thrift,jfarrell/thrift,jeking3/thrift,windofthesky/thrift,dcelasun/thrift,bgould/thrift,rewardStyle/apache.thrift,jackscott/thrift,jeking3/thrift,jfarrell/thrift,bmiklautz/thrift,x1957/thrift,chenbaihu/thrift,rmhartog/thrift,prashantv/thrift,EasonYi/thrift,Jimdo/thrift,upfluence/thrift,NOMORECOFFEE/thrift,pinterest/thrift,timse/thrift,fernandobt8/thrift,guodongxiaren/thrift,flamholz/thrift,rewardStyle/apache.thrift,ahnqirage/thrift,collinmsn/thrift,roshan/thrift,lion117/lib-thrift,dwnld/thrift,akshaydeo/thrift,wfxiang08/thrift,weweadsl/thrift,weweadsl/thrift,chenbaihu/thrift,SuperAwesomeLTD/thrift,jfarrell/thrift,RobberPhex/thrift,authbox-lib/thrift,i/thrift,reTXT/thrift,crisish/thrift,NOMORECOFFEE/thrift,mindcandy/thrift,tanmaykm/thrift,chentao/thrift,vashstorm/thrift,gadLinux/thrift,Fitbit/thrift,RobberPhex/thrift,jfarrell/thrift,chentao/thrift,chentao/thrift,mway08/thrift,theopolis/thrift,terminalcloud/thrift,prathik/thrift,bmiklautz/thrift,3013216027/thrift,chenbaihu/thrift,bgould/thrift,markerickson-wf/thrift,bgould/thrift,strava/thrift,apache/thrift,jpgneves/thrift,EasonYi/thrift,ykwd/thrift,nsuke/thrift,lion117/lib-thrift,wfxiang08/thrift,apache/thrift,BluechipSystems/thrift,prashantv/thrift,Jens-G/thrift,crisish/thrift,dsturnbull/thrift,msonnabaum/thrift,Fitbit/thrift,evanweible-wf/thrift,zzmp/thrift,elloray/thrift,afds/thrift,timse/thrift,hcorg/thrift,springheeledjak/thrift,RobberPhex/thrift,koofr/thrift,haruwo/thrift-with-java-annotation-support,pinterest/thrift,JoeEnnever/thrift,tanmaykm/thrift,strava/thrift,Pertino/thrift,elloray/thrift,bforbis/thrift,springheeledjak/thrift,fernandobt8/thrift,dwnld/thrift,flandr/thrift,i/thrift,tanmaykm/thrift,adamvduke/thrift-adamd,ahnqirage/thrift,bitemyapp/thrift,tylertreat/thrift,gadLinux/thrift,RobberPhex/thrift,bmiklautz/thrift,bufferoverflow/thrift,Pertino/thrift,siemens/thrift,nsuke/thrift,project-zerus/thrift,bitfinder/thrift,cjmay/thrift,dtmuller/thrift,jeking3/thrift,siemens/thrift,zhaorui1/thrift,Jens-G/thrift,Sean-Der/thrift,SentientTechnologies/thrift,wfxiang08/thrift,dwnld/thrift,pinterest/thrift,jackscott/thrift,Fitbit/thrift,elloray/thrift,vashstorm/thrift,creker/thrift,pinterest/thrift,Jens-G/thrift,apache/thrift,mway08/thrift,koofr/thrift,apache/thrift,theopolis/thrift,bitfinder/thrift,theopolis/thrift,BluechipSystems/thrift,roshan/thrift,project-zerus/thrift,x1957/thrift,msonnabaum/thrift,jfarrell/thrift,springheeledjak/thrift,NOMORECOFFEE/thrift,windofthesky/thrift,tylertreat/thrift,nsuke/thrift,terminalcloud/thrift,haruwo/thrift-with-java-annotation-support,Jens-G/thrift,NOMORECOFFEE/thrift,bforbis/thrift,jpgneves/thrift,wingedkiwi/thrift,Jens-G/thrift,msonnabaum/thrift,markerickson-wf/thrift,joshuabezaleel/thrift,zzmp/thrift,timse/thrift,lion117/lib-thrift,roshan/thrift,terminalcloud/thrift,hcorg/thrift,theopolis/thrift,jackscott/thrift,hcorg/thrift,dtmuller/thrift,jpgneves/thrift,tylertreat/thrift,guodongxiaren/thrift,rewardStyle/apache.thrift,3013216027/thrift,alfredtofu/thrift,pinterest/thrift,SuperAwesomeLTD/thrift,BluechipSystems/thrift,jeking3/thrift,Fitbit/thrift,x1957/thrift,chenbaihu/thrift,vashstorm/thrift,jpgneves/thrift,ykwd/thrift,windofthesky/thrift,lion117/lib-thrift,ochinchina/thrift,ijuma/thrift,theopolis/thrift,SentientTechnologies/thrift,theopolis/thrift,evanweible-wf/thrift,3013216027/thrift,hcorg/thrift,afds/thrift,bitemyapp/thrift,steven-sheffey-tungsten/thrift,nsuke/thrift,gadLinux/thrift,bforbis/thrift,collinmsn/thrift,huahang/thrift,cjmay/thrift,bholbrook73/thrift,akshaydeo/thrift,Sean-Der/thrift,yongju-hong/thrift,project-zerus/thrift,ahnqirage/thrift,collinmsn/thrift,prathik/thrift,flandr/thrift,jackscott/thrift,flandr/thrift,NOMORECOFFEE/thrift,flandr/thrift,hcorg/thrift,rmhartog/thrift,dtmuller/thrift,mindcandy/thrift,dwnld/thrift,ijuma/thrift,JoeEnnever/thrift,eamosov/thrift,dtmuller/thrift,dtmuller/thrift,terminalcloud/thrift,joshuabezaleel/thrift,Sean-Der/thrift,ykwd/thrift,Fitbit/thrift,bitemyapp/thrift,jfarrell/thrift,markerickson-wf/thrift,bgould/thrift,tylertreat/thrift,chentao/thrift,bmiklautz/thrift,apache/thrift,SentientTechnologies/thrift,upfluence/thrift,dcelasun/thrift,selaselah/thrift,rmhartog/thrift,ochinchina/thrift,Pertino/thrift,jpgneves/thrift,timse/thrift,3013216027/thrift,SuperAwesomeLTD/thrift,Sean-Der/thrift,SuperAwesomeLTD/thrift,NOMORECOFFEE/thrift,crisish/thrift,dsturnbull/thrift,jfarrell/thrift,windofthesky/thrift,SentientTechnologies/thrift,dsturnbull/thrift,collinmsn/thrift,yongju-hong/thrift,RobberPhex/thrift,bgould/thrift,zzmp/thrift,jfarrell/thrift,wfxiang08/thrift,windofthesky/thrift,SentientTechnologies/thrift,haruwo/thrift-with-java-annotation-support,Pertino/thrift,ahnqirage/thrift,SirWellington/thrift,akshaydeo/thrift,SirWellington/thrift,bitemyapp/thrift,ahnqirage/thrift,upfluence/thrift,guodongxiaren/thrift,SuperAwesomeLTD/thrift,wfxiang08/thrift,gadLinux/thrift,siemens/thrift,pinterest/thrift,eamosov/thrift,dcelasun/thrift,afds/thrift,collinmsn/thrift,guodongxiaren/thrift,afds/thrift,selaselah/thrift,EasonYi/thrift,authbox-lib/thrift,jpgneves/thrift,yongju-hong/thrift,elloray/thrift,SentientTechnologies/thrift,eonezhang/thrift,project-zerus/thrift,chentao/thrift,weweadsl/thrift,lion117/lib-thrift,rewardStyle/apache.thrift,yongju-hong/thrift,spicavigo/thrift,Pertino/thrift,akshaydeo/thrift,bitemyapp/thrift,dongjiaqiang/thrift,lion117/lib-thrift,bitfinder/thrift,bholbrook73/thrift,guodongxiaren/thrift,strava/thrift,pinterest/thrift,roshan/thrift,gadLinux/thrift,evanweible-wf/thrift,mway08/thrift,bufferoverflow/thrift,apache/thrift,crisish/thrift,cjmay/thrift,ykwd/thrift,NOMORECOFFEE/thrift,project-zerus/thrift,bitemyapp/thrift,joshuabezaleel/thrift,joshuabezaleel/thrift,afds/thrift,mindcandy/thrift,bitfinder/thrift,dsturnbull/thrift,jpgneves/thrift,jfarrell/thrift,jackscott/thrift,spicavigo/thrift,SuperAwesomeLTD/thrift,dcelasun/thrift,evanweible-wf/thrift,msonnabaum/thrift,dtmuller/thrift,wingedkiwi/thrift,3013216027/thrift,roshan/thrift,project-zerus/thrift,spicavigo/thrift,creker/thrift,bufferoverflow/thrift,NOMORECOFFEE/thrift,weweadsl/thrift,BluechipSystems/thrift,weweadsl/thrift,terminalcloud/thrift,strava/thrift,bitfinder/thrift,yongju-hong/thrift,pinterest/thrift,wingedkiwi/thrift,i/thrift,upfluence/thrift,JoeEnnever/thrift,Sean-Der/thrift,bforbis/thrift,bgould/thrift,dcelasun/thrift,upfluence/thrift,ochinchina/thrift,elloray/thrift,steven-sheffey-tungsten/thrift,huahang/thrift,bmiklautz/thrift,jpgneves/thrift,vashstorm/thrift,joshuabezaleel/thrift,Sean-Der/thrift,jeking3/thrift,authbox-lib/thrift,bitfinder/thrift,haruwo/thrift-with-java-annotation-support,3013216027/thrift,tanmaykm/thrift,elloray/thrift,jeking3/thrift,haruwo/thrift-with-java-annotation-support,project-zerus/thrift,SentientTechnologies/thrift,haruwo/thrift-with-java-annotation-support,mway08/thrift,roshan/thrift,reTXT/thrift,ijuma/thrift,prathik/thrift,markerickson-wf/thrift,gadLinux/thrift,dsturnbull/thrift,apache/thrift,project-zerus/thrift,cjmay/thrift,Jens-G/thrift,windofthesky/thrift,hcorg/thrift,creker/thrift,timse/thrift,fernandobt8/thrift,prashantv/thrift,terminalcloud/thrift,creker/thrift,ahnqirage/thrift,guodongxiaren/thrift,Jens-G/thrift,nsuke/thrift,Jimdo/thrift,joshuabezaleel/thrift,Sean-Der/thrift,jackscott/thrift,alfredtofu/thrift,reTXT/thrift,dwnld/thrift,wingedkiwi/thrift,roshan/thrift,akshaydeo/thrift,jfarrell/thrift,Jens-G/thrift,eamosov/thrift,yongju-hong/thrift,huahang/thrift,SirWellington/thrift,haruwo/thrift-with-java-annotation-support,bmiklautz/thrift,3013216027/thrift,crisish/thrift,evanweible-wf/thrift,dtmuller/thrift,steven-sheffey-tungsten/thrift,authbox-lib/thrift,markerickson-wf/thrift,jfarrell/thrift,collinmsn/thrift,eamosov/thrift,guodongxiaren/thrift,hcorg/thrift,rmhartog/thrift,jackscott/thrift,zhaorui1/thrift,Jimdo/thrift,vashstorm/thrift,bforbis/thrift,nsuke/thrift,creker/thrift,adamvduke/thrift-adamd,JoeEnnever/thrift,hcorg/thrift,collinmsn/thrift,3013216027/thrift,flandr/thrift,strava/thrift,prathik/thrift,NOMORECOFFEE/thrift,cjmay/thrift,flamholz/thrift,selaselah/thrift,roshan/thrift,gadLinux/thrift,strava/thrift,JoeEnnever/thrift,markerickson-wf/thrift,Jimdo/thrift,flandr/thrift,dcelasun/thrift,edvakf/thrift,hcorg/thrift,bmiklautz/thrift,SuperAwesomeLTD/thrift,ijuma/thrift,huahang/thrift,bforbis/thrift,zhaorui1/thrift,creker/thrift,jpgneves/thrift,evanweible-wf/thrift,steven-sheffey-tungsten/thrift,flamholz/thrift,SuperAwesomeLTD/thrift,koofr/thrift,SirWellington/thrift,SirWellington/thrift,wfxiang08/thrift,roshan/thrift,dsturnbull/thrift,Pertino/thrift,bmiklautz/thrift,siemens/thrift,flandr/thrift,markerickson-wf/thrift,x1957/thrift,Sean-Der/thrift,fernandobt8/thrift,dwnld/thrift,haruwo/thrift-with-java-annotation-support,steven-sheffey-tungsten/thrift,crisish/thrift,timse/thrift,gadLinux/thrift,weweadsl/thrift,creker/thrift,SuperAwesomeLTD/thrift,windofthesky/thrift,adamvduke/thrift-adamd,pinterest/thrift,bholbrook73/thrift,ykwd/thrift,rewardStyle/apache.thrift,tylertreat/thrift,dongjiaqiang/thrift,JoeEnnever/thrift,bmiklautz/thrift,gadLinux/thrift,JoeEnnever/thrift,JoeEnnever/thrift,wingedkiwi/thrift,zhaorui1/thrift,strava/thrift,guodongxiaren/thrift,strava/thrift,RobberPhex/thrift,ahnqirage/thrift,fernandobt8/thrift,mway08/thrift,upfluence/thrift,dsturnbull/thrift,wfxiang08/thrift,Pertino/thrift,rmhartog/thrift,rewardStyle/apache.thrift,eamosov/thrift,steven-sheffey-tungsten/thrift,afds/thrift,tanmaykm/thrift,weweadsl/thrift,nsuke/thrift,SuperAwesomeLTD/thrift,msonnabaum/thrift,weweadsl/thrift,steven-sheffey-tungsten/thrift,ykwd/thrift,selaselah/thrift,rmhartog/thrift,dcelasun/thrift,upfluence/thrift,ochinchina/thrift,apache/thrift,prathik/thrift,Jimdo/thrift,Jimdo/thrift,koofr/thrift,x1957/thrift,steven-sheffey-tungsten/thrift,3013216027/thrift,joshuabezaleel/thrift,guodongxiaren/thrift,hcorg/thrift,evanweible-wf/thrift,apache/thrift,rmhartog/thrift,bforbis/thrift,reTXT/thrift,prathik/thrift,crisish/thrift,ykwd/thrift,bholbrook73/thrift,SentientTechnologies/thrift,akshaydeo/thrift,BluechipSystems/thrift,spicavigo/thrift,dwnld/thrift,eamosov/thrift,alfredtofu/thrift,eonezhang/thrift,flandr/thrift,edvakf/thrift,ochinchina/thrift,koofr/thrift,chentao/thrift,ahnqirage/thrift,ykwd/thrift,wfxiang08/thrift,RobberPhex/thrift,adamvduke/thrift-adamd,bforbis/thrift,flandr/thrift,elloray/thrift,eamosov/thrift,tanmaykm/thrift,nsuke/thrift,ahnqirage/thrift,flamholz/thrift,RobberPhex/thrift,authbox-lib/thrift,nsuke/thrift,lion117/lib-thrift,steven-sheffey-tungsten/thrift,selaselah/thrift,tylertreat/thrift,x1957/thrift,bmiklautz/thrift,nsuke/thrift,eamosov/thrift,dongjiaqiang/thrift,timse/thrift,i/thrift,upfluence/thrift,BluechipSystems/thrift,creker/thrift,siemens/thrift,evanweible-wf/thrift,prathik/thrift,koofr/thrift,reTXT/thrift,koofr/thrift,dwnld/thrift,ochinchina/thrift,dcelasun/thrift,tylertreat/thrift,koofr/thrift,siemens/thrift,dtmuller/thrift,jackscott/thrift,fernandobt8/thrift,eamosov/thrift,timse/thrift,yongju-hong/thrift,upfluence/thrift,wingedkiwi/thrift,roshan/thrift,pinterest/thrift,prashantv/thrift,SirWellington/thrift,fernandobt8/thrift,collinmsn/thrift,EasonYi/thrift,dwnld/thrift,BluechipSystems/thrift,gadLinux/thrift,vashstorm/thrift,dongjiaqiang/thrift,SentientTechnologies/thrift,Sean-Der/thrift,bufferoverflow/thrift,siemens/thrift,elloray/thrift,bforbis/thrift,cjmay/thrift,jpgneves/thrift,3013216027/thrift,flandr/thrift,huahang/thrift,afds/thrift,ochinchina/thrift,joshuabezaleel/thrift,tylertreat/thrift,terminalcloud/thrift,Sean-Der/thrift,dongjiaqiang/thrift,vashstorm/thrift,alfredtofu/thrift,zhaorui1/thrift,afds/thrift,JoeEnnever/thrift,jeking3/thrift,creker/thrift,spicavigo/thrift,markerickson-wf/thrift,upfluence/thrift,chenbaihu/thrift,huahang/thrift,msonnabaum/thrift,bufferoverflow/thrift,bitfinder/thrift,BluechipSystems/thrift,Jimdo/thrift,Sean-Der/thrift,bgould/thrift,lion117/lib-thrift,wingedkiwi/thrift,jeking3/thrift,project-zerus/thrift,edvakf/thrift,SuperAwesomeLTD/thrift,bgould/thrift,mway08/thrift,theopolis/thrift,chenbaihu/thrift,huahang/thrift,collinmsn/thrift,akshaydeo/thrift,bufferoverflow/thrift,authbox-lib/thrift,springheeledjak/thrift,hcorg/thrift,edvakf/thrift,crisish/thrift,dongjiaqiang/thrift,mway08/thrift,nsuke/thrift,spicavigo/thrift,prashantv/thrift,cjmay/thrift,chentao/thrift,pinterest/thrift,flamholz/thrift,Fitbit/thrift,alfredtofu/thrift,springheeledjak/thrift,mway08/thrift,Fitbit/thrift,joshuabezaleel/thrift,Jimdo/thrift,msonnabaum/thrift,huahang/thrift,ykwd/thrift,selaselah/thrift,authbox-lib/thrift,crisish/thrift,msonnabaum/thrift,alfredtofu/thrift,mindcandy/thrift,chentao/thrift,selaselah/thrift,zzmp/thrift,haruwo/thrift-with-java-annotation-support,Fitbit/thrift,Sean-Der/thrift,chentao/thrift,Pertino/thrift,x1957/thrift,theopolis/thrift,zhaorui1/thrift,prashantv/thrift,evanweible-wf/thrift,bgould/thrift,mindcandy/thrift,dongjiaqiang/thrift,wingedkiwi/thrift,springheeledjak/thrift,zhaorui1/thrift,siemens/thrift,authbox-lib/thrift,RobberPhex/thrift,jeking3/thrift,EasonYi/thrift,springheeledjak/thrift,dsturnbull/thrift,afds/thrift,alfredtofu/thrift,bforbis/thrift,spicavigo/thrift,ykwd/thrift,Jimdo/thrift,EasonYi/thrift,prathik/thrift,spicavigo/thrift,akshaydeo/thrift,guodongxiaren/thrift,wfxiang08/thrift,elloray/thrift,bholbrook73/thrift,reTXT/thrift,jackscott/thrift,dtmuller/thrift,lion117/lib-thrift,zzmp/thrift,nsuke/thrift,nsuke/thrift,SirWellington/thrift,spicavigo/thrift,RobberPhex/thrift,SentientTechnologies/thrift,jeking3/thrift,Jens-G/thrift,theopolis/thrift,adamvduke/thrift-adamd,mindcandy/thrift,windofthesky/thrift,3013216027/thrift,rewardStyle/apache.thrift,jpgneves/thrift,bholbrook73/thrift,edvakf/thrift,ijuma/thrift,ahnqirage/thrift,eonezhang/thrift,RobberPhex/thrift,eamosov/thrift,steven-sheffey-tungsten/thrift,rmhartog/thrift,cjmay/thrift,prathik/thrift,dongjiaqiang/thrift,strava/thrift,flamholz/thrift,RobberPhex/thrift,ochinchina/thrift,huahang/thrift,yongju-hong/thrift,mway08/thrift,Pertino/thrift,reTXT/thrift,jfarrell/thrift,cjmay/thrift,crisish/thrift,i/thrift,fernandobt8/thrift,ijuma/thrift,tanmaykm/thrift,dcelasun/thrift,Fitbit/thrift,afds/thrift,bholbrook73/thrift,evanweible-wf/thrift,upfluence/thrift,x1957/thrift,tanmaykm/thrift,bitfinder/thrift,reTXT/thrift,tylertreat/thrift,wfxiang08/thrift,chentao/thrift,EasonYi/thrift,bforbis/thrift,edvakf/thrift,wfxiang08/thrift,creker/thrift,flamholz/thrift,fernandobt8/thrift,i/thrift,edvakf/thrift,eonezhang/thrift,siemens/thrift,ijuma/thrift,zzmp/thrift,eonezhang/thrift,eamosov/thrift,edvakf/thrift,rmhartog/thrift,Jens-G/thrift,RobberPhex/thrift,3013216027/thrift,koofr/thrift,dsturnbull/thrift,Fitbit/thrift,dcelasun/thrift,mindcandy/thrift,yongju-hong/thrift,apache/thrift,prashantv/thrift,yongju-hong/thrift,jfarrell/thrift,dwnld/thrift,apache/thrift,gadLinux/thrift,jfarrell/thrift,x1957/thrift,eonezhang/thrift,bitemyapp/thrift,Jens-G/thrift,bholbrook73/thrift,gadLinux/thrift,bmiklautz/thrift,rewardStyle/apache.thrift,wfxiang08/thrift,haruwo/thrift-with-java-annotation-support,flamholz/thrift,SentientTechnologies/thrift,lion117/lib-thrift,SirWellington/thrift,weweadsl/thrift,chenbaihu/thrift,adamvduke/thrift-adamd,afds/thrift,bforbis/thrift,RobberPhex/thrift,Jens-G/thrift,selaselah/thrift,steven-sheffey-tungsten/thrift,bufferoverflow/thrift,haruwo/thrift-with-java-annotation-support,adamvduke/thrift-adamd,ochinchina/thrift,apache/thrift,edvakf/thrift,project-zerus/thrift,project-zerus/thrift,hcorg/thrift,chenbaihu/thrift,guodongxiaren/thrift,theopolis/thrift,strava/thrift,pinterest/thrift,strava/thrift,huahang/thrift,dwnld/thrift,apache/thrift,Jimdo/thrift,springheeledjak/thrift,SentientTechnologies/thrift,zzmp/thrift,evanweible-wf/thrift,cjmay/thrift,vashstorm/thrift,theopolis/thrift,JoeEnnever/thrift,Jens-G/thrift,BluechipSystems/thrift,strava/thrift,gadLinux/thrift,elloray/thrift,ahnqirage/thrift,eonezhang/thrift,mindcandy/thrift,weweadsl/thrift,ijuma/thrift,dongjiaqiang/thrift,siemens/thrift,vashstorm/thrift,roshan/thrift,bgould/thrift,bmiklautz/thrift,haruwo/thrift-with-java-annotation-support,Fitbit/thrift,eamosov/thrift,i/thrift,Pertino/thrift,jackscott/thrift,flamholz/thrift,elloray/thrift,NOMORECOFFEE/thrift,siemens/thrift,BluechipSystems/thrift,chenbaihu/thrift,huahang/thrift,eonezhang/thrift,chenbaihu/thrift,chentao/thrift,eonezhang/thrift,terminalcloud/thrift,alfredtofu/thrift,nsuke/thrift,Fitbit/thrift,siemens/thrift,chenbaihu/thrift,prashantv/thrift,adamvduke/thrift-adamd,Fitbit/thrift,yongju-hong/thrift,rmhartog/thrift,bholbrook73/thrift,ochinchina/thrift,jfarrell/thrift,3013216027/thrift,Jens-G/thrift,tylertreat/thrift,RobberPhex/thrift,i/thrift,mway08/thrift,weweadsl/thrift,zzmp/thrift,tylertreat/thrift,Fitbit/thrift,chentao/thrift,roshan/thrift,adamvduke/thrift-adamd,markerickson-wf/thrift,springheeledjak/thrift,reTXT/thrift,joshuabezaleel/thrift,markerickson-wf/thrift,i/thrift,akshaydeo/thrift,dcelasun/thrift,dwnld/thrift,Jens-G/thrift,cjmay/thrift,dtmuller/thrift,collinmsn/thrift,project-zerus/thrift,tanmaykm/thrift,eamosov/thrift,nsuke/thrift,crisish/thrift,cjmay/thrift,windofthesky/thrift,dtmuller/thrift,eonezhang/thrift,joshuabezaleel/thrift,fernandobt8/thrift,selaselah/thrift,RobberPhex/thrift,terminalcloud/thrift,springheeledjak/thrift,rmhartog/thrift,akshaydeo/thrift,ahnqirage/thrift,apache/thrift,bforbis/thrift,EasonYi/thrift,lion117/lib-thrift,dtmuller/thrift,mindcandy/thrift,alfredtofu/thrift,prashantv/thrift,nsuke/thrift,bforbis/thrift,strava/thrift,mindcandy/thrift,mindcandy/thrift,bufferoverflow/thrift,bitemyapp/thrift,yongju-hong/thrift,bitfinder/thrift,dtmuller/thrift,selaselah/thrift,yongju-hong/thrift,SirWellington/thrift,ijuma/thrift,NOMORECOFFEE/thrift,collinmsn/thrift,eonezhang/thrift,wingedkiwi/thrift,dcelasun/thrift,authbox-lib/thrift,authbox-lib/thrift,ochinchina/thrift,edvakf/thrift,edvakf/thrift,vashstorm/thrift,zzmp/thrift,prathik/thrift,tanmaykm/thrift,EasonYi/thrift,Jimdo/thrift,yongju-hong/thrift,i/thrift,bitfinder/thrift,elloray/thrift,terminalcloud/thrift,zhaorui1/thrift,collinmsn/thrift,prashantv/thrift,jackscott/thrift,ahnqirage/thrift,hcorg/thrift,Pertino/thrift,cjmay/thrift,jeking3/thrift,jackscott/thrift,bufferoverflow/thrift,dsturnbull/thrift,gadLinux/thrift,dcelasun/thrift,rewardStyle/apache.thrift,Sean-Der/thrift,terminalcloud/thrift,msonnabaum/thrift,SirWellington/thrift,Jimdo/thrift,upfluence/thrift,x1957/thrift,reTXT/thrift,jpgneves/thrift,dcelasun/thrift,flamholz/thrift,koofr/thrift,markerickson-wf/thrift,jfarrell/thrift,bgould/thrift,pinterest/thrift,creker/thrift,bitfinder/thrift,eamosov/thrift,weweadsl/thrift,spicavigo/thrift,EasonYi/thrift,apache/thrift,afds/thrift,bitemyapp/thrift,dsturnbull/thrift,adamvduke/thrift-adamd,theopolis/thrift,SentientTechnologies/thrift,yongju-hong/thrift,chentao/thrift,x1957/thrift,eamosov/thrift,bforbis/thrift,jeking3/thrift,mway08/thrift,prashantv/thrift,joshuabezaleel/thrift,x1957/thrift,fernandobt8/thrift,project-zerus/thrift,timse/thrift,bitemyapp/thrift,wfxiang08/thrift,timse/thrift,collinmsn/thrift,EasonYi/thrift,dcelasun/thrift,bholbrook73/thrift,timse/thrift,zhaorui1/thrift,ochinchina/thrift,apache/thrift,reTXT/thrift,dwnld/thrift,wingedkiwi/thrift,BluechipSystems/thrift,dongjiaqiang/thrift,tylertreat/thrift,selaselah/thrift,Jens-G/thrift,strava/thrift,strava/thrift,BluechipSystems/thrift,bmiklautz/thrift,steven-sheffey-tungsten/thrift,reTXT/thrift,apache/thrift,bgould/thrift,eamosov/thrift,SentientTechnologies/thrift,bitemyapp/thrift,cjmay/thrift,chentao/thrift,bufferoverflow/thrift,lion117/lib-thrift,zzmp/thrift,alfredtofu/thrift,bgould/thrift,prathik/thrift,bholbrook73/thrift,JoeEnnever/thrift,wingedkiwi/thrift,bitemyapp/thrift,apache/thrift,alfredtofu/thrift,i/thrift,markerickson-wf/thrift |
1c5fa955cdf5999bcb941130f02528090a37981e | src/include/access/heaptuple.h | src/include/access/heaptuple.h | /*-------------------------------------------------------------------------
*
* heaptuple.h--
*
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heaptuple.h,v 1.1 1996/10/18 17:58:33 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef HEAPTUPLE_H
#define HEAPTUPLE_H
extern char *heap_getattr(HeapTuple tup,
Buffer b,
int attnum,
TupleDesc tupleDesc,
bool *isnull);
#endif /* HEAP_TUPLE_H */
| Add prototype for heap_getattr() to quiet compiler | Add prototype for heap_getattr() to quiet compiler
| C | mpl-2.0 | techdragon/Postgres-XL,kaknikhil/gpdb,yazun/postgres-xl,arcivanov/postgres-xl,zaksoup/gpdb,atris/gpdb,janebeckman/gpdb,rvs/gpdb,oberstet/postgres-xl,xuegang/gpdb,zaksoup/gpdb,jmcatamney/gpdb,jmcatamney/gpdb,zaksoup/gpdb,randomtask1155/gpdb,lpetrov-pivotal/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,xuegang/gpdb,zeroae/postgres-xl,greenplum-db/gpdb,0x0FFF/gpdb,oberstet/postgres-xl,zaksoup/gpdb,xinzweb/gpdb,rvs/gpdb,kaknikhil/gpdb,ahachete/gpdb,xinzweb/gpdb,xinzweb/gpdb,Chibin/gpdb,postmind-net/postgres-xl,edespino/gpdb,royc1/gpdb,zeroae/postgres-xl,ahachete/gpdb,xuegang/gpdb,chrishajas/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,xuegang/gpdb,0x0FFF/gpdb,rubikloud/gpdb,royc1/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,adam8157/gpdb,ashwinstar/gpdb,rvs/gpdb,kaknikhil/gpdb,Quikling/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,jmcatamney/gpdb,oberstet/postgres-xl,rubikloud/gpdb,zaksoup/gpdb,tangp3/gpdb,pavanvd/postgres-xl,ovr/postgres-xl,tangp3/gpdb,atris/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,rvs/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,chrishajas/gpdb,rvs/gpdb,chrishajas/gpdb,greenplum-db/gpdb,50wu/gpdb,CraigHarris/gpdb,royc1/gpdb,CraigHarris/gpdb,ahachete/gpdb,yuanzhao/gpdb,techdragon/Postgres-XL,royc1/gpdb,yuanzhao/gpdb,lisakowen/gpdb,tangp3/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,xinzweb/gpdb,zeroae/postgres-xl,lintzc/gpdb,xuegang/gpdb,0x0FFF/gpdb,kaknikhil/gpdb,Postgres-XL/Postgres-XL,Quikling/gpdb,lisakowen/gpdb,atris/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,foyzur/gpdb,50wu/gpdb,yuanzhao/gpdb,chrishajas/gpdb,snaga/postgres-xl,CraigHarris/gpdb,zeroae/postgres-xl,ahachete/gpdb,arcivanov/postgres-xl,cjcjameson/gpdb,Quikling/gpdb,cjcjameson/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,foyzur/gpdb,CraigHarris/gpdb,rubikloud/gpdb,Chibin/gpdb,edespino/gpdb,postmind-net/postgres-xl,greenplum-db/gpdb,rvs/gpdb,lintzc/gpdb,randomtask1155/gpdb,lisakowen/gpdb,cjcjameson/gpdb,techdragon/Postgres-XL,ashwinstar/gpdb,CraigHarris/gpdb,randomtask1155/gpdb,zaksoup/gpdb,ovr/postgres-xl,arcivanov/postgres-xl,lisakowen/gpdb,atris/gpdb,lintzc/gpdb,cjcjameson/gpdb,chrishajas/gpdb,pavanvd/postgres-xl,cjcjameson/gpdb,pavanvd/postgres-xl,adam8157/gpdb,kaknikhil/gpdb,xuegang/gpdb,jmcatamney/gpdb,yuanzhao/gpdb,snaga/postgres-xl,lintzc/gpdb,rvs/gpdb,atris/gpdb,adam8157/gpdb,kmjungersen/PostgresXL,kaknikhil/gpdb,foyzur/gpdb,foyzur/gpdb,janebeckman/gpdb,tpostgres-projects/tPostgres,yuanzhao/gpdb,Quikling/gpdb,tpostgres-projects/tPostgres,lpetrov-pivotal/gpdb,Quikling/gpdb,snaga/postgres-xl,randomtask1155/gpdb,CraigHarris/gpdb,tangp3/gpdb,lintzc/gpdb,techdragon/Postgres-XL,lisakowen/gpdb,xuegang/gpdb,0x0FFF/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,adam8157/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,janebeckman/gpdb,CraigHarris/gpdb,ahachete/gpdb,xinzweb/gpdb,Chibin/gpdb,0x0FFF/gpdb,edespino/gpdb,50wu/gpdb,postmind-net/postgres-xl,Quikling/gpdb,adam8157/gpdb,xinzweb/gpdb,janebeckman/gpdb,rubikloud/gpdb,lintzc/gpdb,tpostgres-projects/tPostgres,Chibin/gpdb,chrishajas/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,lintzc/gpdb,tangp3/gpdb,yazun/postgres-xl,janebeckman/gpdb,rubikloud/gpdb,50wu/gpdb,50wu/gpdb,edespino/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,ahachete/gpdb,xuegang/gpdb,ahachete/gpdb,Quikling/gpdb,lintzc/gpdb,Chibin/gpdb,postmind-net/postgres-xl,pavanvd/postgres-xl,yuanzhao/gpdb,edespino/gpdb,jmcatamney/gpdb,lpetrov-pivotal/gpdb,janebeckman/gpdb,rvs/gpdb,arcivanov/postgres-xl,Postgres-XL/Postgres-XL,0x0FFF/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,yazun/postgres-xl,lintzc/gpdb,ashwinstar/gpdb,Quikling/gpdb,adam8157/gpdb,snaga/postgres-xl,ovr/postgres-xl,foyzur/gpdb,tangp3/gpdb,rubikloud/gpdb,janebeckman/gpdb,ashwinstar/gpdb,50wu/gpdb,atris/gpdb,chrishajas/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,ovr/postgres-xl,50wu/gpdb,foyzur/gpdb,edespino/gpdb,snaga/postgres-xl,rubikloud/gpdb,royc1/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,oberstet/postgres-xl,adam8157/gpdb,chrishajas/gpdb,atris/gpdb,kaknikhil/gpdb,lisakowen/gpdb,Chibin/gpdb,zaksoup/gpdb,ahachete/gpdb,tangp3/gpdb,oberstet/postgres-xl,royc1/gpdb,50wu/gpdb,xinzweb/gpdb,foyzur/gpdb,edespino/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,rubikloud/gpdb,ashwinstar/gpdb,xuegang/gpdb,CraigHarris/gpdb,Quikling/gpdb,kaknikhil/gpdb,zaksoup/gpdb,edespino/gpdb,Chibin/gpdb,royc1/gpdb,kmjungersen/PostgresXL,jmcatamney/gpdb,Postgres-XL/Postgres-XL,Postgres-XL/Postgres-XL,edespino/gpdb,janebeckman/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,Chibin/gpdb,atris/gpdb,yazun/postgres-xl,0x0FFF/gpdb,yazun/postgres-xl,cjcjameson/gpdb,adam8157/gpdb,randomtask1155/gpdb,Quikling/gpdb,xinzweb/gpdb,janebeckman/gpdb,0x0FFF/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,rvs/gpdb,edespino/gpdb,arcivanov/postgres-xl,Chibin/gpdb,ovr/postgres-xl,lisakowen/gpdb,foyzur/gpdb,cjcjameson/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl |
|
fadc5f679f9aae27b623c95f91208b2f139e089e | tests/embedded/main.c | tests/embedded/main.c | /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t cpu_set;
/* Just call a bunch of functions to see if we can link and run */
cpu_set = mytest_hwloc_cpuset_alloc();
mytest_hwloc_topology_init(&topology);
mytest_hwloc_topology_load(topology);
depth = mytest_hwloc_topology_get_depth(topology);
printf("Max depth: %u\n", depth);
mytest_hwloc_topology_destroy(topology);
mytest_hwloc_cpuset_free(cpu_set);
return 0;
}
| /*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t cpu_set;
/* Just call a bunch of functions to see if we can link and run */
printf("*** Test 1: cpuset alloc\n");
cpu_set = mytest_hwloc_cpuset_alloc();
printf("*** Test 2: topology init\n");
mytest_hwloc_topology_init(&topology);
printf("*** Test 3: topology load\n");
mytest_hwloc_topology_load(topology);
printf("*** Test 4: topology get depth\n");
depth = mytest_hwloc_topology_get_depth(topology);
printf(" Max depth: %u\n", depth);
printf("*** Test 5: topology destroy\n");
mytest_hwloc_topology_destroy(topology);
printf("*** Test 6: cpuset free\n");
mytest_hwloc_cpuset_free(cpu_set);
return 0;
}
| Add some more print statements to this test, ju... | Add some more print statements to this test, ju...
Add some more print statements to this test, just to help
differentiate the output when debugging is enabled
This commit was SVN r1752.
| C | bsd-3-clause | ggouaillardet/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc,ggouaillardet/hwloc,shekkbuilder/hwloc |
a13c9cb6fcb83f58c111ec35cfe629e74cff13c3 | main.c | main.c | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
int main(int argc, char **argv) {
srand(time(NULL));
double aa[] = {2, 0, 1,
-2, 3, 4,
-5, 5, 6};
Matrix *a = new_matrix(aa, 3, 3);
Matrix *ain = inverse(a);
double bb[] = {1, -1, -2,
2, 4, 5,
6, 0, -3};
Matrix *b = new_matrix(bb, 3, 3);
Matrix *bin = inverse(b);
print_matrix(a);
if (ain == ERR_SINGULAR_MATRIX_INVERSE) {
printf("Inverse of singular matrix.\n");
} else {
print_matrix(ain);
}
print_matrix(b);
if (bin == ERR_SINGULAR_MATRIX_INVERSE) {
printf("Inverse of singular matrix.\n");
} else {
print_matrix(bin);
}
free_matrix(a);
free_matrix(ain);
free_matrix(b);
free_matrix(bin);
}
| #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
#define VARIABLE_START 'A'
#define VARIABLE_COUNT 26
static Matrix *variables[VARIABLE_COUNT];
Matrix *get_variable(int c) {
if (c < 0 || c >= VARIABLE_COUNT) {
return NULL;
}
return variables[c - VARIABLE_START];
}
// Returns -1 on failure, 0 on success.
int set_variable(int c, Matrix *a) {
if (c < 0 || c >= VARIABLE_COUNT) {
return -1;
}
variables[c - VARIABLE_START] = a;
return 0;
}
/*
* Format:
* 3 2 : 1 2 3 4 5 6
* Yields:
* [[1 2]
* [3 4]
* [5 6]]
*/
Matrix *read_matrix(char *s) {
int rows, cols, size;
rows = strtol(s, &s, 10);
cols = strtol(s, &s, 10);
size = rows * cols;
double aa[size];
s += 3; // space colon space
int i;
for (i = 0; i < size; i++) {
aa[i] = strtol(s, &s, 10);
}
return new_matrix(aa, rows, cols);
}
int main(int argc, char **argv) {
srand(time(NULL));
Matrix *a = read_matrix("6 1 : 1 0 0 0 0 1");
print_matrix(a);
free_matrix(a);
}
| Add variables and reading from string. | Add variables and reading from string.
| C | mit | jlubi333/Julina |
27caed992cd71fa50dcb6576b31f8a25b4611bee | src/include/uapi/libct-errors.h | src/include/uapi/libct-errors.h | #ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/* Generic */
#define LCTERR_BADCTSTATE -2 /* Bad container state */
#define LCTERR_BADFSTYPE -3 /* Bad FS type */
#define LCTERR_BADNETTYPE -4 /* Bad Net type */
#define LCTERR_BADOPTION -5 /* Bad option requested */
/* RPC-specific ones */
#define LCTERR_BADCTRID -42 /* Bad container remote ID given */
#define LCTERR_BADCTRNAME -43 /* Bad name on open */
#define LCTERR_RPCUNKNOWN -44 /* Remote problem , but err is not given */
#define LCTERR_RPCCOMM -45 /* Error communicating via channel */
#endif /* __LIBCT_ERRORS_H__ */
| #ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/*
* -1 is "reserved" for generic "something went wrong" result
* since this value can be (well, is) widely explicitly used
* all over the code.
*/
/* Generic */
#define LCTERR_BADCTSTATE -2 /* Bad container state */
#define LCTERR_BADFSTYPE -3 /* Bad FS type */
#define LCTERR_BADNETTYPE -4 /* Bad Net type */
#define LCTERR_BADOPTION -5 /* Bad option requested */
/* RPC-specific ones */
#define LCTERR_BADCTRID -42 /* Bad container remote ID given */
#define LCTERR_BADCTRNAME -43 /* Bad name on open */
#define LCTERR_RPCUNKNOWN -44 /* Remote problem , but err is not given */
#define LCTERR_RPCCOMM -45 /* Error communicating via channel */
#endif /* __LIBCT_ERRORS_H__ */
| Add comment about "reserved" -1 value | err: Add comment about "reserved" -1 value
Signed-off-by: Pavel Emelyanov <[email protected]>
| C | apache-2.0 | LK4D4/libct,avagin/libct,xemul/libct,cyrillos/xemul-libct,xemul/libct,cyrillos/xemul-libct,LK4D4/libct,hallyn/libct,cyrillos/xemul-libct,xemul/libct,xemul/libct,cyrillos/xemul-libct,hallyn/libct,avagin/libct,avagin/libct,hallyn/libct,LK4D4/libct |
3790101271d3fb24db76257b9ac491e7b6d4c4e4 | CPDAcknowledgements/CPDStyle.h | CPDAcknowledgements/CPDStyle.h | @import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This is the current default:
/// <html><head>{{STYLESHEET}}<meta name='viewport' content='width=device-width'></head><body>{{HEADER}}<p>{{BODY}}</p></body></html>
@property (nonatomic, copy) NSString * _Nullable libraryHTML;
/// CSS for styling your library
///
/// This is the current default:
/// <style> body{ font-family:HelveticaNeue; font-size: 14px; padding:12px; -webkit-user-select:none; }
// #summary{ font-size: 18px; }
// #version{ float: left; padding: 6px; }
// #license{ float: right; padding: 6px; } .clear-fix { clear:both };
// </style>
@property (nonatomic, copy) NSString * _Nullable libraryCSS;
/// HTML specifically for showing the header information about a library
///
/// This is the current default
/// <p id='summary'>{{SUMMARY}}</p><p id='version'>{{VERSION}}</p><p id='license'>{{SHORT_LICENSE}}</p> <br class='clear-fix' />
@property (nonatomic, copy) NSString * _Nullable libraryHeaderHTML;
@end
NS_ASSUME_NONNULL_END | @import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// This is the current default:
/// <html><head>{{STYLESHEET}}<meta name='viewport' content='width=device-width'></head><body>{{HEADER}}<p>{{BODY}}</p></body></html>
@property (nonatomic, copy) NSString * _Nullable libraryHTML;
/// CSS for styling your library
///
/// This is the current default:
/// <style> body{ font-family:HelveticaNeue; font-size: 14px; padding:12px; -webkit-user-select:none; }
// #summary{ font-size: 18px; }
// #version{ float: left; padding: 6px; }
// #license{ float: right; padding: 6px; } .clear-fix { clear:both };
// </style>
@property (nonatomic, copy) NSString * _Nullable libraryCSS;
/// HTML specifically for showing the header information about a library
///
/// This is the current default
/// <p id='summary'>{{SUMMARY}}</p><p id='version'>{{VERSION}}</p><p id='license'>{{SHORT_LICENSE}}</p> <br class='clear-fix'>
@property (nonatomic, copy) NSString * _Nullable libraryHeaderHTML;
@end
NS_ASSUME_NONNULL_END
| Fix 'HTML start tag prematurely ended' warning | Fix 'HTML start tag prematurely ended' warning
| C | mit | CocoaPods/CPDAcknowledgements |
6bd246f7dc75101536a89c6b4ff776a05d8efb50 | ST_HW_HC_SR04.h | ST_HW_HC_SR04.h | /*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
*/
#ifndef ST_HW_HC_SR04
#define ST_HW_HC_SR04
#include "Arduino.h"
class ST_HW_HC_SR04 {
public:
ST_HW_HC_SR04(byte triggerPin, byte echoPin);
ST_HW_HC_SR04(byte triggerPin, byte echoPin, unsigned long timeout);
void setTimeout(unsigned long timeout);
void setTimeoutToDefaultValue();
unsigned long getTimeout();
int getHitTime();
private:
byte triggerPin;
byte echoPin;
unsigned long timeout;
void triggerPulse();
};
#endif
| /*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
*/
#ifndef ST_HW_HC_SR04_H
#define ST_HW_HC_SR04_H
#include "Arduino.h"
class ST_HW_HC_SR04 {
public:
ST_HW_HC_SR04(byte triggerPin, byte echoPin);
ST_HW_HC_SR04(byte triggerPin, byte echoPin, unsigned long timeout);
void setTimeout(unsigned long timeout);
void setTimeoutToDefaultValue();
unsigned long getTimeout();
int getHitTime();
private:
byte triggerPin;
byte echoPin;
unsigned long timeout;
void triggerPulse();
};
#endif
| Fix include guard conflicting with the class name | Fix include guard conflicting with the class name
| C | mit | Spaguetron/ST_HW_HC_SR04 |
bcba02f9fd5018f781631a25f53e0a8f432ed229 | libs/incs/ac_bits.h | libs/incs/ac_bits.h | /*
* Copyright 2015 Wink Saville
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SADIE_LIBS_INCS_AC_BITS_H
#define SADIE_LIBS_INCS_AC_BITS_H
#define AC_BIT(type, n) (((type)1) << n)
#endif
| Add AC_BITS to convert a bit number 0..N-1 to a mask. | Add AC_BITS to convert a bit number 0..N-1 to a mask.
| C | apache-2.0 | winksaville/sadie,winksaville/sadie |
|
6be828419968fa1f105f7362832b4eafb2157ab6 | proctor/include/pcl/proctor/proposer.h | proctor/include/pcl/proctor/proposer.h | #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
float votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
| #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
double votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
| Change votes to use double. | Change votes to use double.
git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4320 a9d63959-f2ad-4865-b262-bf0e56cfafb6
| C | bsd-3-clause | psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn,psoetens/pcl-svn |
59ea31827fd5fde1f5a5899a186e6fa18c65d83e | Firmware/GPIO/main.c | Firmware/GPIO/main.c | #include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
GPIO_SetBits(GPIOD, GPIO_Pin_12);
return 0;
}
| #include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OType_PP,
.GPIO_PuPd = GPIO_PuPd_DOWN
};
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_Init(GPIOD, &GPIO_InitStruct);
}
int main()
{
init_GPIO();
int digitStatus = 1;
while(1) {
GPIO_WriteBit(GPIOD, GPIO_Pin_12, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_13, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_14, digitStatus);
delay(1000000L);
GPIO_WriteBit(GPIOD, GPIO_Pin_15, digitStatus);
delay(1000000L);
digitStatus = (digitStatus + 1) % 2;
}
return 0;
}
| Add the blink effect to the GPIO demo | Add the blink effect to the GPIO demo
| C | mit | PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,PUCSIE-embedded-course/stm32f4-examples,shengwen1997/stm32_pratice |
7b6feece93869c598a44f03470e2a1d7c5eac9b9 | PHPHub/Constants/APIConstant.h | PHPHub/Constants/APIConstant.h | //
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBaseURL @"https://staging_api.phphub.org"
#else
#define APIBaseURL @"https://api.phphub.org"
#endif
#define PHPHubHost @"phphub.org"
#define PHPHubUrl @"https://phphub.org/"
#define GitHubURL @"https://github.com/"
#define TwitterURL @"https://twitter.com/"
#define ProjectURL @"https://github.com/phphub/phphub-ios"
#define AboutPageURL @"https://phphub.org/about"
#define ESTGroupURL @"http://est-group.org"
#define PHPHubGuide @"https://phphub.org/guide"
#define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback" | //
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBaseURL @"https://staging_api.phphub.org"
#else
#define APIBaseURL @"https://api.phphub.org"
#endif
#define PHPHubHost @"phphub.org"
#define PHPHubUrl @"https://phphub.org/"
#define GitHubURL @"https://github.com/"
#define TwitterURL @"https://twitter.com/"
#define ProjectURL @"https://github.com/phphub/phphub-ios"
#define AboutPageURL @"https://phphub.org/about"
#define ESTGroupURL @"http://est-group.org"
#define PHPHubGuide @"https://phphub.org/helps/qr-login-guide"
#define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback" | Change QR login guide url | Change QR login guide url
| C | mit | Aufree/phphub-ios |
92165a2024a4285f9df8a92fbfe19c91d77e74b4 | Inc/project_config.h | Inc/project_config.h | #ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
#define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values from LEP_PCOLOR_LUT_E in Middlewares/lepton_sdk/Inc/LEPTON_VID.h
#define PSUEDOCOLOR_LUT LEP_VID_FUSION_LUT
#endif
#ifndef USART_DEBUG_SPEED
#define USART_DEBUG_SPEED (921600)
#endif
#define WHITE_LED_TOGGLE (HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6))
#endif
| #ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
// #define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values from LEP_PCOLOR_LUT_E in Middlewares/lepton_sdk/Inc/LEPTON_VID.h
#define PSUEDOCOLOR_LUT LEP_VID_FUSION_LUT
#endif
#ifndef USART_DEBUG_SPEED
#define USART_DEBUG_SPEED (921600)
#endif
#define WHITE_LED_TOGGLE (HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6))
#endif
| Disable THERMAL_DATA_UART by default. This is a big CPU sink, and is a pretty non-standard config. | Disable THERMAL_DATA_UART by default. This is a big CPU sink, and is a pretty non-standard config.
| C | mit | groupgets/purethermal1-firmware,groupgets/purethermal1-firmware,groupgets/purethermal1-firmware,groupgets/purethermal1-firmware |
e8938694357e4048322aae1819bea29c8ba59223 | drivers/timer/sys_clock_init.c | drivers/timer/sys_clock_init.c | /*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @brief Initialize system clock driver
*
* Initializing the timer driver is done in this module to reduce code
* duplication. Although both nanokernel and microkernel systems initialize
* the timer driver at the same point, the two systems differ in when the system
* can begin to process system clock ticks. A nanokernel system can process
* system clock ticks once the driver has initialized. However, in a
* microkernel system all system clock ticks are deferred (and stored on the
* kernel server command stack) until the kernel server fiber starts and begins
* processing any queued ticks.
*/
#include <nanokernel.h>
#include <init.h>
#include <drivers/system_timer.h>
SYS_INIT(_sys_clock_driver_init,
#ifdef CONFIG_MICROKERNEL
MICROKERNEL,
#else
NANOKERNEL,
#endif
CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
| /*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @brief Initialize system clock driver
*
* Initializing the timer driver is done in this module to reduce code
* duplication. Although both nanokernel and microkernel systems initialize
* the timer driver at the same point, the two systems differ in when the system
* can begin to process system clock ticks. A nanokernel system can process
* system clock ticks once the driver has initialized. However, in a
* microkernel system all system clock ticks are deferred (and stored on the
* kernel server command stack) until the kernel server fiber starts and begins
* processing any queued ticks.
*/
#include <nanokernel.h>
#include <init.h>
#include <drivers/system_timer.h>
SYS_INIT(_sys_clock_driver_init, NANOKERNEL, CONFIG_SYSTEM_CLOCK_INIT_PRIORITY);
| Revert "sys_clock: start the microkernel ticker in the MICROKERNEL init level" | Revert "sys_clock: start the microkernel ticker in the MICROKERNEL init level"
This reverts commit 3c66686a43ffa78932aaa6b1e2338c2f3d347a13.
That commit fixed announcing ticks before the microkernel was up, but
prevented devices initializing before the MICROKERNEL level from having
access to the hi-res part of the system clock, which they could not poll
anymore.
Change-Id: Ia1c55d482e63d295160942f97ebc8e8afd1e8315
Signed-off-by: Benjamin Walsh <[email protected]>
| C | apache-2.0 | runchip/zephyr-cc3220,holtmann/zephyr,kraj/zephyr,fractalclone/zephyr-riscv,sharronliu/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyriot/zephyr,fractalclone/zephyr-riscv,bigdinotech/zephyr,pklazy/zephyr,erwango/zephyr,mirzak/zephyr-os,mbolivar/zephyr,runchip/zephyr-cc3200,aceofall/zephyr-iotos,galak/zephyr,explora26/zephyr,nashif/zephyr,punitvara/zephyr,galak/zephyr,rsalveti/zephyr,finikorg/zephyr,mbolivar/zephyr,mbolivar/zephyr,pklazy/zephyr,rsalveti/zephyr,mbolivar/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,coldnew/zephyr-project-fork,kraj/zephyr,mirzak/zephyr-os,coldnew/zephyr-project-fork,bboozzoo/zephyr,punitvara/zephyr,zephyriot/zephyr,erwango/zephyr,punitvara/zephyr,nashif/zephyr,tidyjiang8/zephyr-doc,runchip/zephyr-cc3200,kraj/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3200,bboozzoo/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3200,ldts/zephyr,runchip/zephyr-cc3220,tidyjiang8/zephyr-doc,punitvara/zephyr,galak/zephyr,finikorg/zephyr,tidyjiang8/zephyr-doc,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,aceofall/zephyr-iotos,Vudentz/zephyr,finikorg/zephyr,bboozzoo/zephyr,sharronliu/zephyr,32bitmicro/zephyr,erwango/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,bboozzoo/zephyr,runchip/zephyr-cc3220,punitvara/zephyr,runchip/zephyr-cc3220,sharronliu/zephyr,holtmann/zephyr,Vudentz/zephyr,bigdinotech/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,erwango/zephyr,mirzak/zephyr-os,runchip/zephyr-cc3200,sharronliu/zephyr,Vudentz/zephyr,sharronliu/zephyr,pklazy/zephyr,zephyriot/zephyr,coldnew/zephyr-project-fork,fbsder/zephyr,pklazy/zephyr,tidyjiang8/zephyr-doc,ldts/zephyr,32bitmicro/zephyr,mirzak/zephyr-os,zephyrproject-rtos/zephyr,fractalclone/zephyr-riscv,bigdinotech/zephyr,holtmann/zephyr,rsalveti/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,ldts/zephyr,fbsder/zephyr,rsalveti/zephyr,mirzak/zephyr-os,kraj/zephyr,fbsder/zephyr,fractalclone/zephyr-riscv,fbsder/zephyr,32bitmicro/zephyr,explora26/zephyr,runchip/zephyr-cc3220,Vudentz/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,coldnew/zephyr-project-fork,32bitmicro/zephyr,explora26/zephyr,kraj/zephyr,Vudentz/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,mbolivar/zephyr,galak/zephyr,coldnew/zephyr-project-fork,zephyriot/zephyr,tidyjiang8/zephyr-doc,GiulianoFranchetto/zephyr,bigdinotech/zephyr,aceofall/zephyr-iotos,32bitmicro/zephyr,erwango/zephyr,rsalveti/zephyr,ldts/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,fbsder/zephyr,nashif/zephyr,pklazy/zephyr,finikorg/zephyr |
978e851a0ea6e8c54d072f745bbd8d1cd0451e54 | include/swift/Basic/Algorithm.h | include/swift/Basic/Algorithm.h | //===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines helper algorithms, some of which are ported from C++14,
// which may not be available on all platforms yet.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_ALGORITHM_H
#define SWIFT_BASIC_ALGORITHM_H
namespace swift {
/// Returns the minimum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& min(const T &a, const T &b) {
return !(b < a) ? a : b;
}
} // end namespace swift
#endif /* SWIFT_BASIC_ALGORITHM_H */
| //===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines helper algorithms, some of which are ported from C++14,
// which may not be available on all platforms yet.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_BASIC_ALGORITHM_H
#define SWIFT_BASIC_ALGORITHM_H
namespace swift {
/// Returns the minimum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& min(const T &a, const T &b) {
return !(b < a) ? a : b;
}
/// Returns the maximum of `a` and `b`, or `a` if they are equivalent.
template <typename T>
constexpr const T& max(const T &a, const T &b) {
return (a < b) ? b : a;
}
} // end namespace swift
#endif /* SWIFT_BASIC_ALGORITHM_H */
| Add constexpr version of maximum to algorithm | Add constexpr version of maximum to algorithm
Add the constexpr version of max which is only available in std since c++14.
Besides being a logical addition next to the already implemented constexpr version of min, there are actually other files, even in Swift/Basic itself, which re-implement this functionality, such as PrefixMap.h. Once this is implemented here, the functionality can be re-used in those other locations, instead of re-implemented each time. | C | apache-2.0 | jmgc/swift,lorentey/swift,aschwaighofer/swift,tinysun212/swift-windows,ken0nek/swift,xwu/swift,benlangmuir/swift,djwbrown/swift,nathawes/swift,natecook1000/swift,ahoppen/swift,huonw/swift,apple/swift,jckarter/swift,benlangmuir/swift,karwa/swift,russbishop/swift,apple/swift,devincoughlin/swift,jopamer/swift,felix91gr/swift,kperryua/swift,karwa/swift,jmgc/swift,gribozavr/swift,stephentyrone/swift,amraboelela/swift,devincoughlin/swift,gmilos/swift,djwbrown/swift,Jnosh/swift,tkremenek/swift,johnno1962d/swift,shahmishal/swift,uasys/swift,brentdax/swift,gribozavr/swift,jopamer/swift,huonw/swift,kperryua/swift,amraboelela/swift,airspeedswift/swift,gottesmm/swift,zisko/swift,russbishop/swift,hughbe/swift,allevato/swift,alblue/swift,gottesmm/swift,glessard/swift,xedin/swift,austinzheng/swift,manavgabhawala/swift,JGiola/swift,hooman/swift,jtbandes/swift,tardieu/swift,frootloops/swift,jopamer/swift,rudkx/swift,ben-ng/swift,parkera/swift,johnno1962d/swift,modocache/swift,jckarter/swift,practicalswift/swift,stephentyrone/swift,practicalswift/swift,parkera/swift,ken0nek/swift,gmilos/swift,SwiftAndroid/swift,deyton/swift,aschwaighofer/swift,natecook1000/swift,gregomni/swift,JaSpa/swift,frootloops/swift,atrick/swift,stephentyrone/swift,sschiau/swift,KrishMunot/swift,djwbrown/swift,huonw/swift,arvedviehweger/swift,swiftix/swift,return/swift,lorentey/swift,stephentyrone/swift,swiftix/swift,IngmarStein/swift,brentdax/swift,KrishMunot/swift,lorentey/swift,practicalswift/swift,OscarSwanros/swift,russbishop/swift,harlanhaskins/swift,return/swift,kperryua/swift,xwu/swift,russbishop/swift,SwiftAndroid/swift,tinysun212/swift-windows,jmgc/swift,parkera/swift,ahoppen/swift,arvedviehweger/swift,tardieu/swift,harlanhaskins/swift,parkera/swift,roambotics/swift,ahoppen/swift,rudkx/swift,ben-ng/swift,tkremenek/swift,roambotics/swift,rudkx/swift,jopamer/swift,felix91gr/swift,hooman/swift,practicalswift/swift,devincoughlin/swift,calebd/swift,hooman/swift,ken0nek/swift,uasys/swift,hooman/swift,ahoppen/swift,hughbe/swift,codestergit/swift,kstaring/swift,harlanhaskins/swift,gribozavr/swift,dreamsxin/swift,calebd/swift,zisko/swift,frootloops/swift,gmilos/swift,jopamer/swift,roambotics/swift,frootloops/swift,IngmarStein/swift,deyton/swift,bitjammer/swift,glessard/swift,karwa/swift,stephentyrone/swift,benlangmuir/swift,codestergit/swift,CodaFi/swift,deyton/swift,sschiau/swift,swiftix/swift,kperryua/swift,amraboelela/swift,modocache/swift,nathawes/swift,manavgabhawala/swift,gribozavr/swift,xwu/swift,xedin/swift,shahmishal/swift,modocache/swift,danielmartin/swift,hooman/swift,kperryua/swift,kstaring/swift,shahmishal/swift,JaSpa/swift,CodaFi/swift,felix91gr/swift,parkera/swift,stephentyrone/swift,lorentey/swift,russbishop/swift,lorentey/swift,lorentey/swift,gregomni/swift,felix91gr/swift,bitjammer/swift,return/swift,parkera/swift,djwbrown/swift,SwiftAndroid/swift,bitjammer/swift,JGiola/swift,amraboelela/swift,sschiau/swift,OscarSwanros/swift,ken0nek/swift,stephentyrone/swift,devincoughlin/swift,airspeedswift/swift,tkremenek/swift,devincoughlin/swift,harlanhaskins/swift,deyton/swift,JGiola/swift,danielmartin/swift,ahoppen/swift,atrick/swift,xedin/swift,tjw/swift,gottesmm/swift,aschwaighofer/swift,shajrawi/swift,zisko/swift,Jnosh/swift,russbishop/swift,tkremenek/swift,gottesmm/swift,gregomni/swift,JaSpa/swift,parkera/swift,harlanhaskins/swift,Jnosh/swift,jckarter/swift,huonw/swift,alblue/swift,OscarSwanros/swift,johnno1962d/swift,ben-ng/swift,arvedviehweger/swift,gmilos/swift,gmilos/swift,gribozavr/swift,natecook1000/swift,amraboelela/swift,SwiftAndroid/swift,brentdax/swift,tjw/swift,jtbandes/swift,xwu/swift,dreamsxin/swift,gmilos/swift,kstaring/swift,airspeedswift/swift,zisko/swift,KrishMunot/swift,austinzheng/swift,nathawes/swift,tinysun212/swift-windows,manavgabhawala/swift,KrishMunot/swift,arvedviehweger/swift,brentdax/swift,alblue/swift,amraboelela/swift,devincoughlin/swift,brentdax/swift,return/swift,karwa/swift,modocache/swift,shahmishal/swift,aschwaighofer/swift,allevato/swift,IngmarStein/swift,hughbe/swift,benlangmuir/swift,Jnosh/swift,CodaFi/swift,manavgabhawala/swift,jtbandes/swift,Jnosh/swift,xwu/swift,ken0nek/swift,return/swift,KrishMunot/swift,codestergit/swift,shajrawi/swift,codestergit/swift,SwiftAndroid/swift,felix91gr/swift,therealbnut/swift,swiftix/swift,tjw/swift,austinzheng/swift,gregomni/swift,shajrawi/swift,hooman/swift,jckarter/swift,shajrawi/swift,xwu/swift,jopamer/swift,glessard/swift,uasys/swift,felix91gr/swift,shajrawi/swift,swiftix/swift,IngmarStein/swift,therealbnut/swift,karwa/swift,OscarSwanros/swift,harlanhaskins/swift,kstaring/swift,rudkx/swift,KrishMunot/swift,therealbnut/swift,uasys/swift,ken0nek/swift,tinysun212/swift-windows,xedin/swift,JaSpa/swift,JGiola/swift,danielmartin/swift,tardieu/swift,calebd/swift,JGiola/swift,djwbrown/swift,shajrawi/swift,tinysun212/swift-windows,deyton/swift,CodaFi/swift,alblue/swift,rudkx/swift,danielmartin/swift,bitjammer/swift,sschiau/swift,modocache/swift,benlangmuir/swift,practicalswift/swift,aschwaighofer/swift,jmgc/swift,roambotics/swift,milseman/swift,swiftix/swift,zisko/swift,shahmishal/swift,johnno1962d/swift,frootloops/swift,atrick/swift,modocache/swift,tinysun212/swift-windows,kstaring/swift,shajrawi/swift,xwu/swift,therealbnut/swift,hughbe/swift,karwa/swift,gottesmm/swift,huonw/swift,OscarSwanros/swift,ben-ng/swift,jckarter/swift,tjw/swift,zisko/swift,calebd/swift,jmgc/swift,arvedviehweger/swift,therealbnut/swift,practicalswift/swift,milseman/swift,manavgabhawala/swift,arvedviehweger/swift,swiftix/swift,devincoughlin/swift,natecook1000/swift,ahoppen/swift,ben-ng/swift,SwiftAndroid/swift,huonw/swift,sschiau/swift,airspeedswift/swift,uasys/swift,sschiau/swift,OscarSwanros/swift,hooman/swift,JGiola/swift,benlangmuir/swift,ben-ng/swift,rudkx/swift,lorentey/swift,brentdax/swift,deyton/swift,apple/swift,xedin/swift,austinzheng/swift,gottesmm/swift,milseman/swift,ben-ng/swift,kperryua/swift,OscarSwanros/swift,tardieu/swift,devincoughlin/swift,tinysun212/swift-windows,gmilos/swift,allevato/swift,codestergit/swift,jtbandes/swift,kstaring/swift,danielmartin/swift,atrick/swift,bitjammer/swift,xedin/swift,shajrawi/swift,nathawes/swift,aschwaighofer/swift,austinzheng/swift,jtbandes/swift,manavgabhawala/swift,codestergit/swift,zisko/swift,JaSpa/swift,atrick/swift,bitjammer/swift,return/swift,alblue/swift,danielmartin/swift,felix91gr/swift,sschiau/swift,nathawes/swift,gribozavr/swift,tkremenek/swift,jmgc/swift,hughbe/swift,allevato/swift,djwbrown/swift,glessard/swift,IngmarStein/swift,gottesmm/swift,kperryua/swift,frootloops/swift,JaSpa/swift,natecook1000/swift,huonw/swift,natecook1000/swift,therealbnut/swift,gribozavr/swift,jckarter/swift,karwa/swift,tjw/swift,glessard/swift,Jnosh/swift,allevato/swift,tardieu/swift,natecook1000/swift,frootloops/swift,milseman/swift,arvedviehweger/swift,tardieu/swift,gregomni/swift,xedin/swift,harlanhaskins/swift,practicalswift/swift,SwiftAndroid/swift,airspeedswift/swift,shahmishal/swift,jtbandes/swift,therealbnut/swift,kstaring/swift,apple/swift,codestergit/swift,parkera/swift,airspeedswift/swift,practicalswift/swift,deyton/swift,apple/swift,nathawes/swift,hughbe/swift,hughbe/swift,manavgabhawala/swift,shahmishal/swift,alblue/swift,brentdax/swift,jopamer/swift,Jnosh/swift,IngmarStein/swift,JaSpa/swift,jmgc/swift,roambotics/swift,djwbrown/swift,uasys/swift,uasys/swift,austinzheng/swift,johnno1962d/swift,bitjammer/swift,jtbandes/swift,milseman/swift,KrishMunot/swift,allevato/swift,sschiau/swift,IngmarStein/swift,johnno1962d/swift,amraboelela/swift,calebd/swift,atrick/swift,alblue/swift,tardieu/swift,apple/swift,CodaFi/swift,karwa/swift,calebd/swift,glessard/swift,return/swift,gregomni/swift,nathawes/swift,CodaFi/swift,gribozavr/swift,roambotics/swift,CodaFi/swift,johnno1962d/swift,tjw/swift,calebd/swift,austinzheng/swift,shahmishal/swift,tkremenek/swift,ken0nek/swift,airspeedswift/swift,tjw/swift,danielmartin/swift,tkremenek/swift,modocache/swift,lorentey/swift,aschwaighofer/swift,russbishop/swift,milseman/swift,allevato/swift,milseman/swift,jckarter/swift,xedin/swift |
dbab7e6e9385e42426ecfe79c4679b05cd4438d4 | bgc/DIC_ATMOS.h | bgc/DIC_ATMOS.h | C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
& total_atmos_carbon_start,
& total_ocean_carbon_start,
& atpco2,total_atmos_moles
_RL co2atmos(1000)
_RL total_atmos_carbon
_RL total_ocean_carbon
_RL total_atmos_carbon_year
_RL total_atmos_carbon_start
_RL total_ocean_carbon_year
_RL total_ocean_carbon_start
_RL atpco2
_RL total_atmos_moles
| C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
& total_atmos_carbon_start,
& total_ocean_carbon_start,
& atpco2,total_atmos_moles
_RL co2atmos(1002)
_RL total_atmos_carbon
_RL total_ocean_carbon
_RL total_atmos_carbon_year
_RL total_atmos_carbon_start
_RL total_ocean_carbon_year
_RL total_ocean_carbon_start
_RL atpco2
_RL total_atmos_moles
| Update length of co2atmos variable | Update length of co2atmos variable
| C | mit | seamanticscience/mitgcm_mods,seamanticscience/mitgcm_mods |
246d5ce439738b24d9881ddcd03ea8e53f20609f | VPUQuickTimePlayback/VPUSupport.h | VPUQuickTimePlayback/VPUSupport.h | //
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVPUSPixelFormatTypeRGB_DXT1 'DXt1'
#define kVPUSPixelFormatTypeRGBA_DXT1 'DXT1'
#define kVPUSPixelFormatTypeRGBA_DXT5 'DXT5'
#define kVPUSPixelFormatTypeYCoCg_DXT5 'DYT5'
BOOL VPUSMovieHasVPUTrack(QTMovie *movie);
CFDictionaryRef VPUCreateCVPixelBufferOptionsDictionary();
#endif
| //
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#define kVPUSPixelFormatTypeRGB_DXT1 'DXt1'
#define kVPUSPixelFormatTypeRGBA_DXT1 'DXT1'
#define kVPUSPixelFormatTypeRGBA_DXT5 'DXT5'
#define kVPUSPixelFormatTypeYCoCg_DXT5 'DYt5'
BOOL VPUSMovieHasVPUTrack(QTMovie *movie);
CFDictionaryRef VPUCreateCVPixelBufferOptionsDictionary();
#endif
| Update pixel format type for CoreVideo Scaled YCoCg DXT5 to match change in codec | Update pixel format type for CoreVideo Scaled YCoCg DXT5 to match change in codec
| C | bsd-2-clause | Vidvox/hap-quicktime-playback-demo |
cd3a37cf027a42b18cb6ee9df1f1816774f5eb34 | alice4/software/libgl/hardware_events.c | alice4/software/libgl/hardware_events.c | #include <stdio.h>
#include "event_service.h"
#include "touchscreen.h"
#include "device.h"
typedef struct event {
int32_t device;
int16_t val;
// union here for other events like keys
} event;
#define INPUT_QUEUE_SIZE 128
static event input_queue[INPUT_QUEUE_SIZE];
// The next time that needs to be read:
static int input_queue_head = 0;
// The number of items in the queue (tail = (head + length) % len):
static int input_queue_length = 0;
static int mousex = -1; // valuator for touchscreen X
static int mousey = -1; // valuator for touchscreen X
static void enqueue_event(event *e)
{
if (input_queue_length == INPUT_QUEUE_SIZE) {
printf("Input queue overflow.");
} else {
int tail = (input_queue_head + input_queue_length) % INPUT_QUEUE_SIZE;
input_queue[tail] = *e;
input_queue_length++;
}
}
static void drain_touchscreen()
{
int x, y;
float z;
TouchscreenEvent e;
event ev;
while((e = touchscreen_read(&x, &y, &z)) != TOUCHSCREEN_IDLE) {
switch(e) {
case TOUCHSCREEN_START:
ev.device = LEFTMOUSE;
ev.val = 1;
enqueue_event(&ev);
break;
case TOUCHSCREEN_DRAG:
mousex = x;
mousey = y;
break;
case TOUCHSCREEN_STOP:
ev.device = LEFTMOUSE;
ev.val = 0;
enqueue_event(&ev);
break;
case TOUCHSCREEN_IDLE:
default:
break;
}
}
// usleep(100000);
}
int32_t events_get_valuator(int32_t device)
{
drain_touchscreen();
if(device == MOUSEX)
return mousex;
else if(device == MOUSEY)
return mousey;
return 0;
}
void events_qdevice(int32_t device)
{
}
uint32_t event_qread_start(int blocking)
{
drain_touchscreen();
return input_queue_length;
}
int32_t events_qread_continue(int16_t *value)
{
*value = input_queue[input_queue_head].val;
int32_t device = input_queue[input_queue_head].device;
input_queue_head = (input_queue_head + 1) % INPUT_QUEUE_SIZE;
input_queue_length--;
return device;
}
int32_t events_winopen(char *title)
{
touchscreen_init();
drain_touchscreen();
return 0;
}
void events_tie(int32_t button, int32_t val1, int32_t val2)
{
}
| Add beginnings of events on hardware | Add beginnings of events on hardware
| C | apache-2.0 | lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice |
|
f1360fc78e8b536000bb4abd5146d0394a7d2e3c | cpp11-migrate/LoopConvert/LoopConvert.h | cpp11-migrate/LoopConvert/LoopConvert.h | //===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file provides the definition of the LoopConvertTransform
/// class which is the main interface to the loop-convert transform
/// that tries to make use of range-based for loops where possible.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#include "Transform.h"
#include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE
/// \brief Subclass of Transform that transforms for-loops into range-based
/// for-loops where possible.
class LoopConvertTransform : public Transform {
public:
/// \brief \see Transform::run().
virtual int apply(const FileContentsByPath &InputStates,
RiskLevel MaxRiskLevel,
const clang::tooling::CompilationDatabase &Database,
const std::vector<std::string> &SourcePaths,
FileContentsByPath &ResultStates) LLVM_OVERRIDE;
};
#endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
| //===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief This file provides the definition of the LoopConvertTransform
/// class which is the main interface to the loop-convert transform
/// that tries to make use of range-based for loops where possible.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
#include "Transform.h"
#include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE
/// \brief Subclass of Transform that transforms for-loops into range-based
/// for-loops where possible.
class LoopConvertTransform : public Transform {
public:
/// \see Transform::run().
virtual int apply(const FileContentsByPath &InputStates,
RiskLevel MaxRiskLevel,
const clang::tooling::CompilationDatabase &Database,
const std::vector<std::string> &SourcePaths,
FileContentsByPath &ResultStates) LLVM_OVERRIDE;
};
#endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H
| Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command) | Fix a -Wdocumentation warning (empty paragraph passed to '\brief' command)
git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@172661 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra |
029422ddadc251b23cc2441bd42c46f8172a44b0 | src/core/SkEdgeBuilder.h | src/core/SkEdgeBuilder.h | #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
class SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
| #ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
struct SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEdge** edgeList() { return fList.begin(); }
private:
SkChunkAlloc fAlloc;
SkTDArray<SkEdge*> fList;
int fShiftUp;
void addLine(const SkPoint pts[]);
void addQuad(const SkPoint pts[]);
void addCubic(const SkPoint pts[]);
void addClipper(SkEdgeClipper*);
};
#endif
| Fix warning (struct forward-declared as class). | Fix warning (struct forward-declared as class).
Review URL: http://codereview.appspot.com/164061
| C | bsd-3-clause | csulmone/skia,csulmone/skia,csulmone/skia,csulmone/skia |
3c7cc7cad858aaf4b656863f6ab405ef05a2d42e | src/qt/clicklabel.h | src/qt/clicklabel.h | #ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseReleaseEvent(QMouseEvent *event);
};
#endif // CLICKLABEL_H
| #ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseReleaseEvent(QMouseEvent *event);
};
#endif // CLICKLABEL_H
| Use nullptr to stay Qt4 compatible. | Use nullptr to stay Qt4 compatible.
| C | mit | Git-Jiro/Gridcoin-Research,caraka/gridcoinresearch,theMarix/Gridcoin-Research,theMarix/Gridcoin-Research,TheCharlatan/Gridcoin-Research,TheCharlatan/Gridcoin-Research,TheCharlatan/Gridcoin-Research,caraka/gridcoinresearch,tomasbrod/Gridcoin-Research,theMarix/Gridcoin-Research,TheCharlatan/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,tomasbrod/Gridcoin-Research,theMarix/Gridcoin-Research,caraka/gridcoinresearch,caraka/gridcoinresearch,Git-Jiro/Gridcoin-Research,theMarix/Gridcoin-Research,gridcoin/Gridcoin-Research,caraka/gridcoinresearch,gridcoin/Gridcoin-Research,theMarix/Gridcoin-Research,tomasbrod/Gridcoin-Research,gridcoin/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,Git-Jiro/Gridcoin-Research,gridcoin/Gridcoin-Research,tomasbrod/Gridcoin-Research,tomasbrod/Gridcoin-Research,TheCharlatan/Gridcoin-Research,caraka/gridcoinresearch |
139936b34a895520e9ee8b9a6d3f774754cdcc48 | lib/libF77/d_lg10.c | lib/libF77/d_lg10.c | #include "f2c.h"
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10e * log(*x) );
}
| #include "f2c.h"
#ifdef KR_headers
double log10();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10(*x) );
}
| Use the C library version of log10() instead of the inaccurate formula log10(x) = log10e * log(x). This fixes some small (one or two ULP) inaccuracies. | Use the C library version of log10() instead of the inaccurate formula
log10(x) = log10e * log(x). This fixes some small (one or two ULP)
inaccuracies.
Found by: ucbtest
| 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 |
cfdaffb8cf65ab0a934de2efb513e66989b4bad6 | src/lib/elm_map_legacy.h | src/lib/elm_map_legacy.h | /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
#include "elm_map.eo.legacy.h" | /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
/**
* @internal
*
* @brief Requests a list of addresses corresponding to a given name.
*
* @since 1.8
*
* @remarks This is used if you want to search the address from a name.
*
* @param obj The map object
* @param address The address
* @param name_cb The callback function
* @param data The user callback data
*
* @ingroup Map
*/
EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
#include "elm_map.eo.legacy.h"
| Add missing legacy API into legacy header | map: Add missing legacy API into legacy header
Summary: @fix
Reviewers: raster
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D1164
| C | lgpl-2.1 | FlorentRevest/Elementary,tasn/elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,rvandegrift/elementary |
bc7ac5431ddd2dd96f0b7b25a3e7c94b40a6bbe1 | src/lib/abstracthighlighter_p.h | src/lib/abstracthighlighter_p.h | /*
Copyright (C) 2016 Volker Krause <[email protected]>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H
#define KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H
#include "definition.h"
#include "theme.h"
class QStringList;
namespace KSyntaxHighlighting {
class ContextSwitch;
class StateData;
class AbstractHighlighterPrivate
{
public:
AbstractHighlighterPrivate();
virtual ~AbstractHighlighterPrivate();
void ensureDefinitionLoaded();
bool switchContext(StateData* data, const ContextSwitch &contextSwitch, const QStringList &captures);
Definition m_definition;
Theme m_theme;
};
}
#endif
| /*
Copyright (C) 2016 Volker Krause <[email protected]>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTER_P_H
#define KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTER_P_H
#include "definition.h"
#include "theme.h"
class QStringList;
namespace KSyntaxHighlighting {
class ContextSwitch;
class StateData;
class AbstractHighlighterPrivate
{
public:
AbstractHighlighterPrivate();
virtual ~AbstractHighlighterPrivate();
void ensureDefinitionLoaded();
bool switchContext(StateData* data, const ContextSwitch &contextSwitch, const QStringList &captures);
Definition m_definition;
Theme m_theme;
};
}
#endif
| Fix typo in include guard | Fix typo in include guard
Found by krazy.
| C | lgpl-2.1 | janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting,janusw/syntax-highlighting |
4fa4c1d56adc1005ce856580848a11bc11598e09 | src/configuration.h | src/configuration.h | #ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM Planner"
#define QGC_APPLICATION_VERSION "v2.0.0 (beta)"
namespace QGC
{
const QString APPNAME = "APMPLANNER2";
const QString COMPANYNAME = "DIYDRONES";
const int APPLICATIONVERSION = 200; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
| #ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "APM Planner"
#define QGC_APPLICATION_VERSION "v2.0.0 (alpha-RC1)"
namespace QGC
{
const QString APPNAME = "APMPLANNER2";
const QString COMPANYNAME = "DIYDRONES";
const int APPLICATIONVERSION = 200; // 1.0.9
}
#endif // QGC_CONFIGURATION_H
| Change for alpha-RC1 version name | Change for alpha-RC1 version name
| C | agpl-3.0 | xros/apm_planner,sutherlandm/apm_planner,xros/apm_planner,LittleBun/apm_planner,labtoast/apm_planner,duststorm/apm_planner,hejunbok/apm_planner,mrpilot2/apm_planner,diydrones/apm_planner,LIKAIMO/apm_planner,mirkix/apm_planner,Icenowy/apm_planner,hejunbok/apm_planner,abcdelf/apm_planner,xros/apm_planner,LIKAIMO/apm_planner,gpaes/apm_planner,kellyschrock/apm_planner,dcarpy/apm_planner,duststorm/apm_planner,chen0510566/apm_planner,381426068/apm_planner,mrpilot2/apm_planner,gpaes/apm_planner,dcarpy/apm_planner,mirkix/apm_planner,mrpilot2/apm_planner,LIKAIMO/apm_planner,kellyschrock/apm_planner,mrpilot2/apm_planner,dcarpy/apm_planner,Icenowy/apm_planner,LittleBun/apm_planner,dcarpy/apm_planner,381426068/apm_planner,xros/apm_planner,381426068/apm_planner,kellyschrock/apm_planner,sutherlandm/apm_planner,mirkix/apm_planner,duststorm/apm_planner,xros/apm_planner,gpaes/apm_planner,Icenowy/apm_planner,mrpilot2/apm_planner,duststorm/apm_planner,chen0510566/apm_planner,WorkerBees/apm_planner,labtoast/apm_planner,mrpilot2/apm_planner,diydrones/apm_planner,Icenowy/apm_planner,kellyschrock/apm_planner,labtoast/apm_planner,abcdelf/apm_planner,abcdelf/apm_planner,LittleBun/apm_planner,kellyschrock/apm_planner,chen0510566/apm_planner,381426068/apm_planner,abcdelf/apm_planner,mirkix/apm_planner,Icenowy/apm_planner,WorkerBees/apm_planner,hejunbok/apm_planner,dcarpy/apm_planner,sutherlandm/apm_planner,dcarpy/apm_planner,LittleBun/apm_planner,diydrones/apm_planner,duststorm/apm_planner,diydrones/apm_planner,labtoast/apm_planner,WorkerBees/apm_planner,sutherlandm/apm_planner,labtoast/apm_planner,gpaes/apm_planner,xros/apm_planner,diydrones/apm_planner,diydrones/apm_planner,labtoast/apm_planner,sutherlandm/apm_planner,LIKAIMO/apm_planner,LittleBun/apm_planner,hejunbok/apm_planner,381426068/apm_planner,LIKAIMO/apm_planner,381426068/apm_planner,Icenowy/apm_planner,mirkix/apm_planner,kellyschrock/apm_planner,chen0510566/apm_planner,chen0510566/apm_planner,hejunbok/apm_planner,WorkerBees/apm_planner,gpaes/apm_planner,sutherlandm/apm_planner,gpaes/apm_planner,LIKAIMO/apm_planner,LittleBun/apm_planner,abcdelf/apm_planner,hejunbok/apm_planner,duststorm/apm_planner,abcdelf/apm_planner,mirkix/apm_planner,chen0510566/apm_planner |
5475567b7f05fbc245cedb1b3ecdbc63ac671685 | src/atoin.c | src/atoin.c | /*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.4 2004-12-13 14:21:55 heikki Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
/**
* atoi_n: like atoi but reads at most len characters.
*/
int atoi_n (const char *buf, int len)
{
int val = 0;
while (--len >= 0)
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
buf++;
}
return val;
}
| /*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.5 2004-12-16 08:59:56 adam Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>
/**
* atoi_n: like atoi but reads at most len characters.
*/
int atoi_n (const char *buf, int len)
{
int val = 0;
while (--len >= 0)
{
if (isdigit (*(const unsigned char *) buf))
val = val*10 + (*buf - '0');
buf++;
}
return val;
}
| Include marcdisp.h so that atoi_n gets public on WIN32 | Include marcdisp.h so that atoi_n gets public on WIN32
| C | bsd-3-clause | nla/yaz,nla/yaz,nla/yaz,dcrossleyau/yaz,nla/yaz,dcrossleyau/yaz,dcrossleyau/yaz |
ead111a8e26f98570cfdb9b3b849e5fac3ca7e7b | ext/rbuv/rbuv.c | ext/rbuv/rbuv.c | #include "rbuv.h"
ID id_call;
VALUE mRbuv;
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
Init_rbuv_error();
Init_rbuv_handle();
Init_rbuv_loop();
Init_rbuv_timer();
Init_rbuv_stream();
Init_rbuv_tcp();
Init_rbuv_signal();
}
| #include "rbuv.h"
ID id_call;
VALUE mRbuv;
VALUE rbuv_version(VALUE self);
VALUE rbuv_version_string(VALUE self);
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
rb_define_singleton_method(mRbuv, "version", rbuv_version, 0);
rb_define_singleton_method(mRbuv, "version_string", rbuv_version_string, 0);
Init_rbuv_error();
Init_rbuv_handle();
Init_rbuv_loop();
Init_rbuv_timer();
Init_rbuv_stream();
Init_rbuv_tcp();
Init_rbuv_signal();
}
VALUE rbuv_version(VALUE self) {
return UINT2NUM(uv_version());
}
VALUE rbuv_version_string(VALUE self) {
return rb_str_new2(uv_version_string());
}
| Add singleton methods to access libuv version | Add singleton methods to access libuv version
| C | mit | arthurdandrea/rbuv,arthurdandrea/rbuv |
eb70a569253926f60eab5a9c6d693908b3dd11b9 | src/jcon/json_rpc_result.h | src/jcon/json_rpc_result.h | #pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
| #pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
operator bool() const { return isSuccess(); }
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
| Add conversion-to-bool operator to JsonRpcResult class | Add conversion-to-bool operator to JsonRpcResult class
| C | mit | zeromem88/jcon-cpp,zeromem88/jcon-cpp,joncol/jcon,joncol/jcon-cpp,joncol/jcon,joncol/jcon-cpp,joncol/jcon-cpp,zeromem88/jcon-cpp,joncol/jcon |
4f172d10cffb59af5b7ef99bf18978462320cf6b | src/parse/stmt/parameter.c | src/parse/stmt/parameter.c | #include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
if (ptr[i++] != '(')
{
parse_debug_rewind(debug, dpos);
return 0;
}
unsigned l;
stmt->parameter.list = parse_assign_list(
src, &ptr[i], debug, &l);
if (!stmt->parameter.list)
{
parse_debug_rewind(debug, dpos);
return 0;
}
i += l;
if (ptr[i++] != ')')
{
parse_assign_list_delete(
stmt->parameter.list);
parse_debug_rewind(debug, dpos);
return 0;
}
stmt->type = PARSE_STMT_PARAMETER;
return i;
}
bool parse_stmt_parameter_print(
int fd, const parse_stmt_t* stmt)
{
if (!stmt)
return false;
return (dprintf_bool(fd, "PARAMETER ")
&& parse_assign_list_print(
fd, stmt->parameter.list));
}
| #include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
bool has_brackets = (ptr[i] == '(');
if (has_brackets) i += 1;
unsigned l;
stmt->parameter.list = parse_assign_list(
src, &ptr[i], debug, &l);
if (!stmt->parameter.list)
{
parse_debug_rewind(debug, dpos);
return 0;
}
i += l;
if (has_brackets)
{
if (ptr[i++] != ')')
{
parse_assign_list_delete(
stmt->parameter.list);
parse_debug_rewind(debug, dpos);
return 0;
}
}
stmt->type = PARSE_STMT_PARAMETER;
return i;
}
bool parse_stmt_parameter_print(
int fd, const parse_stmt_t* stmt)
{
if (!stmt)
return false;
return (dprintf_bool(fd, "PARAMETER ")
&& parse_assign_list_print(
fd, stmt->parameter.list));
}
| Support DEC style PARAMETER statements | Support DEC style PARAMETER statements
This is a non-standard feature, but it's easy to support.
http://fortranwiki.org/fortran/show/Modernizing+Old+Fortran
| C | apache-2.0 | CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc,CodethinkLabs/ofc |
708004157299c728b304385f3f4255ffbd587f60 | kernel/core/test.c | kernel/core/test.c | #include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
//__asm__("movb $0x0, %al; outb %al, $0xf4");
__asm__("movb $0xf4, %al; outb %al, $0x0");
__asm__("movb $0x0, %al; outb %al, $0xf4");
halt();
//write_port(2, TEST_RESULT_PORT_NUMBER);
assert(Not_Reached);
}
| #include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
halt();
assert(Not_Reached);
}
| Remove debug messages and duplicate code | Remove debug messages and duplicate code | C | mit | iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth |
7f16d7067e11d2684b644c8af7c21cdc77b32723 | lib/Headers/cpuid.h | lib/Headers/cpuid.h | /*===---- stddef.h - Basic type definitions --------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {
asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level));
return 1;
}
| /*===---- cpuid.h - Basic type definitions ---------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
static inline int __get_cpuid (unsigned int level, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
unsigned int *edx) {
asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level));
return 1;
}
| Fix file name in comments. | Fix file name in comments.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@145184 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
ac544c65813da72f89895278ddb6789f3b624870 | Classes/Model/OBABookmarkV2.h | Classes/Model/OBABookmarkV2.h | @interface OBABookmarkV2 : NSObject {
NSString * _name;
NSArray * _stopIds;
}
- (id) initWithCoder:(NSCoder*)coder;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSArray * stopIds;
@end
| Move this class back to onebusaway-iphone | Move this class back to onebusaway-iphone
| C | apache-2.0 | ualch9/onebusaway-iphone,aaronbrethorst/onebusaway-iphone,bbodenmiller/onebusaway-iphone,bbodenmiller/onebusaway-iphone,themonki/onebusaway-iphone,ualch9/onebusaway-iphone,ualch9/onebusaway-iphone,themonki/onebusaway-iphone,tomtclai/onebusaway-iphone,chadsy/onebusaway-iphone,themonki/onebusaway-iphone,OneBusAway/onebusaway-iphone,whip112/onebusaway-iphone,themonki/onebusaway-iphone,syoung-smallwisdom/onebusaway-iphone,tomtclai/onebusaway-iphone,aaronbrethorst/onebusaway-iphone,OneBusAway/onebusaway-iphone,cathy810218/onebusaway-iphone,aaronbrethorst/onebusaway-iphone,OneBusAway/onebusaway-iphone,whip112/onebusaway-iphone,aaronbrethorst/onebusaway-iphone,whip112/onebusaway-iphone,tomtclai/onebusaway-iphone,themonki/onebusaway-iphone,cathy810218/onebusaway-iphone,chadsy/onebusaway-iphone,cathy810218/onebusaway-iphone,syoung-smallwisdom/onebusaway-iphone,whip112/onebusaway-iphone,ualch9/onebusaway-iphone,cathy810218/onebusaway-iphone,OneBusAway/onebusaway-iphone,ualch9/onebusaway-iphone,syoung-smallwisdom/onebusaway-iphone,bbodenmiller/onebusaway-iphone,chadsy/onebusaway-iphone,OneBusAway/onebusaway-iphone,syoung-smallwisdom/onebusaway-iphone,bbodenmiller/onebusaway-iphone,chadsy/onebusaway-iphone |
|
446affcc0b9fb45d67969d6f91d9adf221e055c5 | libyaul/cons/vdp1.c | libyaul/cons/vdp1.c | /*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <[email protected]>
*/
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static struct cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons_vdp1_new();
cons->driver = cons_vdp1;
cons->write = cons_vdp1_write;
cons_reset(cons);
}
static struct cons_vdp1_t *
cons_vdp1_new(void)
{
static struct cons_vdp1_t cons_vdp1;
return &cons_vdp1;
}
static void
cons_vdp1_write(struct cons *cons, int c, uint8_t fg, uint8_t bg)
{
}
| /*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <[email protected]>
*/
#include <inttypes.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_reset(struct cons *);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons_vdp1_new();
cons->driver = cons_vdp1;
cons->write = cons_vdp1_write;
cons->reset = cons_vdp1_reset;
cons_reset(cons);
}
static cons_vdp1_t *
cons_vdp1_new(void)
{
/* XXX Replace with TLSF */
static cons_vdp1_t cons_vdp1;
return &cons_vdp1;
}
static void
cons_vdp1_reset(struct cons *cons)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons->driver;
/* Reset */
}
static void
cons_vdp1_write(struct cons *cons, int c, uint8_t fg, uint8_t bg)
{
cons_vdp1_t *cons_vdp1;
cons_vdp1 = cons->driver;
}
| Change stubs for VDP1 cons driver | Change stubs for VDP1 cons driver
| C | mit | ChillyWillyGuru/libyaul,ChillyWillyGuru/libyaul |
a014838c02b0abb209e0a182c46574455ea5cd0b | kernel/kernel.c | kernel/kernel.c | #include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install descriptor tables
install_gdt();
install_idt();
install_isrs();
install_irq();
install_keyboard();
asm volatile ("sti");
//Set up VGA text mode, and print a welcome message
initialize_screen();
set_text_colors(VGA_COLOR_LIGHT_GRAY, VGA_COLOR_BLACK);
clear_screen();
printf("NorbyOS v%s\n", NORBY_VERSION);
char* buffer;
while(1) {
printf("==> ");
gets_s(buffer, 100);
if(strcmp(buffer, "colortest") == 0) {
colortest();
}
}
//Enter an endless loop. If you disable this, another loop in boot.asm will
//start, but interrupts will be disabled.
while (1) {}
}
| #include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Install descriptor tables
install_gdt();
install_idt();
install_isrs();
install_irq();
install_keyboard();
asm volatile ("sti");
//Set up VGA text mode, and print a welcome message
initialize_screen();
set_text_colors(VGA_COLOR_LIGHT_GRAY, VGA_COLOR_BLACK);
clear_screen();
printf("NorbyOS v%s\n", NORBY_VERSION);
char* buffer;
while(1) {
printf("==> ");
gets_s(buffer, 100);
if(strcmp(buffer, "colortest") == 0) {
colortest();
}
else if(strcmp(buffer, "clear") == 0) {
clear_screen();
}
}
//Enter an endless loop. If you disable this, another loop in boot.asm will
//start, but interrupts will be disabled.
while (1) {}
}
| Add "clear" command for clearing screen | Add "clear" command for clearing screen
| C | mit | simon-andrews/norby,simon-andrews/norby,simon-andrews/norby |
a9dbb6171167387492343a681a87558d047fb5b8 | test/CodeGen/unwind-attr.c | test/CodeGen/unwind-attr.c | // RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
| // RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
| Fix test case RUN: line (thanks Argiris) | Fix test case RUN: line (thanks Argiris)
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@54922 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang |
df16cf042b6085f68b4263e24f29ad61be71cea8 | nsswitch-internal.h | nsswitch-internal.h | /*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include "config.h"
/* glibc/config.h.in */
#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((regparm (3), stdcall))
#else
# define internal_function
#endif
/* glibc/nss/nsswitch.h */
typedef struct service_user service_user;
extern int __nss_next (service_user **ni, const char *fct_name, void **fctp,
int status, int all_values);
extern int __nss_database_lookup (const char *database,
const char *alternative_name,
const char *defconfig, service_user **ni);
extern void *__nss_lookup_function (service_user *ni, const char *fct_name);
/* glibc/nss/XXX-lookup.c */
extern int __nss_passwd_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
extern int __nss_group_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
#endif /* NSSWITCH_INTERNAL_H */
| /*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include <features.h>
#include "config.h"
/* glibc/config.h.in */
#if __GLIBC_PREREQ(2, 27)
# define internal_function
#elif defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute__ ((regparm (3), stdcall))
#else
# define internal_function
#endif
/* glibc/nss/nsswitch.h */
typedef struct service_user service_user;
extern int __nss_next (service_user **ni, const char *fct_name, void **fctp,
int status, int all_values);
extern int __nss_database_lookup (const char *database,
const char *alternative_name,
const char *defconfig, service_user **ni);
extern void *__nss_lookup_function (service_user *ni, const char *fct_name);
/* glibc/nss/XXX-lookup.c */
extern int __nss_passwd_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
extern int __nss_group_lookup (service_user **ni, const char *fct_name,
void **fctp) internal_function;
#endif /* NSSWITCH_INTERNAL_H */
| Update internal glibc functions ABI for glibc 2.27 | Update internal glibc functions ABI for glibc 2.27
Signed-off-by: Anders Kaseorg <[email protected]>
| C | lgpl-2.1 | andersk/nss_nonlocal,andersk/nss_nonlocal |
9d9b91c4dfe47ef3d32ecc241461955d3c26b3bc | src/clientversion.h | src/clientversion.h | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 5
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 6
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| Increase version to 1.0.2.6 r6 | Increase version to 1.0.2.6 r6 | C | mit | memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core,memeticproject/memetic-core |
bf0d3c50784e0f7a1bb590a3979eba7c50726b1c | chap1/ftoc.c | chap1/ftoc.c | #include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
int fahr;
int cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
fahr = lower;
while (fahr <= upper) {
cel = 5 * (fahr - 32) / 9;
printf("%3d\t%6d\n", fahr, cel);
fahr += step;
}
}
| #include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
float fahr;
float cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
fahr = lower;
while (fahr <= upper) {
cel = (5.0 / 9.0) * (fahr - 32.0);
printf("%3.0f\t%6.1f\n", fahr, cel);
fahr += step;
}
}
| Change from `int` to `float` | Change from `int` to `float`
| C | mit | jabocg/theclang |
3d9b68a94760fa90e3d380525f5547fa8a945538 | os/gl/gl_context.h | os/gl/gl_context.h | // LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
public:
virtual ~GLContext() { }
virtual bool isValid() = 0;
virtual bool createGLContext() = 0;
virtual void destroyGLContext() = 0;
virtual void makeCurrent() = 0;
virtual void swapBuffers() = 0;
};
} // namespace os
#endif
| // LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext {
public:
virtual ~GLContext() { }
virtual bool isValid() { return false; }
virtual bool createGLContext() { }
virtual void destroyGLContext() { }
virtual void makeCurrent() { }
virtual void swapBuffers() { }
};
} // namespace os
#endif
| Make os::GLContext instantiable (isValid() returns false by default) | Make os::GLContext instantiable (isValid() returns false by default)
| C | mit | aseprite/laf,aseprite/laf |
5d4c2bb7b6f10ed33ea32ea97f070766a5ec6f2b | src/vistk/scoring/score_mask.h | src/vistk/scoring/score_mask.h | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-config.h"
#include "scoring_result.h"
#include <vil/vil_image_view.h>
/**
* \file mask_scoring.h
*
* \brief A function for scoring a mask.
*/
namespace vistk
{
/// A typedef for a mask image.
typedef vil_image_view<bool> mask_t;
/**
* \brief Scores a computed mask against a truth mask.
*
* \note The input images are expected to be the same size.
*
* \todo Add error handling to the function (invalid sizes, etc.).
*
* \param truth The truth mask.
* \param computed The computed mask.
*
* \returns The results of the scoring.
*/
scoring_result_t VISTK_SCORING_EXPORT score_mask(mask_t const& truth_mask, mask_t const& computed_mask);
}
#endif // VISTK_SCORING_SCORE_MASK_H
| /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring-config.h"
#include "scoring_result.h"
#include <vil/vil_image_view.h>
#include <boost/cstdint.hpp>
/**
* \file mask_scoring.h
*
* \brief A function for scoring a mask.
*/
namespace vistk
{
/// A typedef for a mask image.
typedef vil_image_view<uint8_t> mask_t;
/**
* \brief Scores a computed mask against a truth mask.
*
* \note The input images are expected to be the same size.
*
* \todo Add error handling to the function (invalid sizes, etc.).
*
* \param truth The truth mask.
* \param computed The computed mask.
*
* \returns The results of the scoring.
*/
scoring_result_t VISTK_SCORING_EXPORT score_mask(mask_t const& truth_mask, mask_t const& computed_mask);
}
#endif // VISTK_SCORING_SCORE_MASK_H
| Use bytes for mask images | Use bytes for mask images
| C | bsd-3-clause | linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,linus-sherrill/sprokit,Kitware/sprokit,Kitware/sprokit,mathstuf/sprokit,mathstuf/sprokit,Kitware/sprokit,linus-sherrill/sprokit |
8ebc25895f4832b73950ca32522dcb51e8ea8f5d | src/kernel/kernel.h | src/kernel/kernel.h | #ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
#endif | #ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
enum STATUS_CODE
{
// General
GENERAL_SUCCESS,
GENERAL_FAILURE
}
#endif | Create an enum for all posible function return status codes | Create an enum for all posible function return status codes
| C | bsd-3-clause | TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS,TwoUnderscorez/DuckOS |
68b56a8eb5f6b950fcd11b089f726bf7aaf7a311 | tools/qb_blackbox.c | tools/qb_blackbox.c | /*
* Copyright (C) 2012 Andrew Beekhof <[email protected]>
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qb/qblog.h>
int
main(int argc, char **argv)
{
int lpc = 0;
for(lpc = 1; lpc < argc && argv[lpc] != NULL; lpc++) {
printf("Dumping the contents of %s\n", argv[lpc]);
qb_log_blackbox_print_from_file(argv[lpc]);
}
return 0;
}
| /*
* Copyright (C) 2012 Andrew Beekhof <[email protected]>
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#include <qb/qblog.h>
int
main(int argc, char **argv)
{
int lpc = 0;
qb_log_init("qb_blackbox", LOG_USER, LOG_TRACE);
qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE);
qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, QB_LOG_FILTER_FILE, "*", LOG_TRACE);
for(lpc = 1; lpc < argc && argv[lpc] != NULL; lpc++) {
printf("Dumping the contents of %s\n", argv[lpc]);
qb_log_blackbox_print_from_file(argv[lpc]);
}
return 0;
}
| Enable error logging for the blackbox reader | Enable error logging for the blackbox reader
| C | lgpl-2.1 | davidvossel/libqb,davidvossel/libqb,rubenk/libqb,ClusterLabs/libqb,kgaillot/libqb,kgaillot/libqb,kgaillot/libqb,gao-yan/libqb,ClusterLabs/libqb,ClusterLabs/libqb,gao-yan/libqb,rubenk/libqb |
b17dbf109de8dae1f917302c383093485beefa10 | ios/RNCallKit/RNCallKit.h | ios/RNCallKit/RNCallKit.h | //
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import "RCTEventEmitter.h"
@interface RNCallKit : RCTEventEmitter <CXProviderDelegate>
@property (nonatomic, strong) CXCallController *callKitCallController;
@property (nonatomic, strong) CXProvider *callKitProvider;
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0);
+ (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler;
@end
| //
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import <React/RCTEventEmitter.h>
@interface RNCallKit : RCTEventEmitter <CXProviderDelegate>
@property (nonatomic, strong) CXCallController *callKitCallController;
@property (nonatomic, strong) CXProvider *callKitProvider;
+ (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options NS_AVAILABLE_IOS(9_0);
+ (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler;
@end
| Fix incorrect import on React-Native >=0.40 | Fix incorrect import on React-Native >=0.40
For reference, see here:
https://github.com/facebook/react-native/commit/e1577df1fd70049ce7f288f91f6e2b18d512ff4d
| C | isc | ianlin/react-native-callkit,ianlin/react-native-callkit,killian90/react-native-callkit |
e7c1ac5d6e80b5def95a61fdb7eb79f4da9e45cb | Runtime/Rendering/ResourceDX11.h | Runtime/Rendering/ResourceDX11.h | #pragma once
#include "Rendering/RendererDX11.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Texture3D,
RenderTarget,
DepthStencilBuffer,
Cubemap
};
class RendererDX11;
class MEAPI ResourceDX11
{
public:
ResourceDX11(RendererDX11* renderer) :
m_bIsInitialized(false),
m_renderer(renderer)
{
}
virtual ~ResourceDX11()
{
}
virtual ID3D11Resource* GetResource() const = 0;
virtual ERenderResourceType GetResourceType() const = 0;
FORCEINLINE bool IsInitialized() const { return m_bIsInitialized; }
FORCEINLINE bool HasAvailableRenderer() const { return (m_renderer != nullptr); }
FORCEINLINE RendererDX11* GetRenderer() const { return m_renderer; }
protected:
FORCEINLINE void ConfirmInitialize() { m_bIsInitialized = true; }
private:
RendererDX11* m_renderer;
bool m_bIsInitialized;
};
} | #pragma once
#include "Rendering/RendererDX11.h"
#include "Core/Engine.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Texture3D,
RenderTarget,
DepthStencilBuffer,
DynamicCubemap
};
class RendererDX11;
class MEAPI ResourceDX11
{
public:
ResourceDX11(RendererDX11* renderer) :
m_bIsInitialized(false),
m_renderer(renderer)
{
}
virtual ~ResourceDX11()
{
m_renderer = nullptr;
}
virtual ID3D11Resource* GetResource() const = 0;
virtual ERenderResourceType GetResourceType() const = 0;
FORCEINLINE bool IsInitialized() const { return m_bIsInitialized; }
FORCEINLINE bool HasAvailableRenderer() const
{
return (m_renderer != nullptr) && (Engine::GetRenderer() == m_renderer);
}
FORCEINLINE RendererDX11* GetRenderer() const { return m_renderer; }
protected:
FORCEINLINE void ConfirmInitialize() { m_bIsInitialized = true; }
private:
RendererDX11* m_renderer;
bool m_bIsInitialized;
};
} | Modify HasAvailableRenderer method to check actually matched with Engine owned renderer | Modify HasAvailableRenderer method to check actually matched with Engine owned renderer
| C | mit | HoRangDev/MileEngine,HoRangDev/MileEngine |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.