hexsha stringlengths 40 40 | size int64 5 2.72M | ext stringclasses 5
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 976 | max_stars_repo_name stringlengths 5 113 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringdate 2015-01-01 00:01:43 2022-03-31 23:59:48 ⌀ | max_stars_repo_stars_event_max_datetime stringdate 2015-01-01 00:06:24 2022-03-31 23:59:53 ⌀ | max_issues_repo_path stringlengths 3 976 | max_issues_repo_name stringlengths 5 116 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count float64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 976 | max_forks_repo_name stringlengths 5 116 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringdate 2015-01-01 00:01:19 2022-03-31 23:59:49 ⌀ | max_forks_repo_forks_event_max_datetime stringdate 2015-01-03 12:00:57 2022-03-31 23:59:49 ⌀ | content stringlengths 5 2.72M | avg_line_length float64 1.38 573k | max_line_length int64 2 1.01M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d881a6eaee6fbebbf18f7e6e019edfce29d85b53 | 1,438 | h | C | src/ofxSerifWindow.h | hiz1/ofxSerifWindow | 6343d702ac95147804465db32e735eb413b05125 | [
"Apache-2.0"
] | null | null | null | src/ofxSerifWindow.h | hiz1/ofxSerifWindow | 6343d702ac95147804465db32e735eb413b05125 | [
"Apache-2.0"
] | null | null | null | src/ofxSerifWindow.h | hiz1/ofxSerifWindow | 6343d702ac95147804465db32e735eb413b05125 | [
"Apache-2.0"
] | null | null | null | //
// ofxSerifWindow.h
// example
//
// Created by hiz on 2015/07/05.
//
//
#ifndef __example__ofxSerifWindow__
#define __example__ofxSerifWindow__
#include "ofMain.h"
#include "ofxSerif.h"
#include "ofxTrueTypeFontUC.h"
class ofxSerifWindow : public ofNode {
public:
ofxSerifWindow() : frame(ofVec2f(-1, -1)), pageNum(0), finished(false), textColor(ofColor::black),
bgColor(ofColor::white), strokeColor(ofColor::black){}
// 描画処理
virtual void customDraw();
// フォントの読み込み
void loadFont(const string &filename, int fontsize);
// 更新処理(speedを2以上にすると、一回で複数文字表示)
void update(int speed=1);
// スキップ処理(現在のページの文章を全て表示)
void skip();
// 次ページに移動(現在のページの文章が全て表示された後のみ有効)
void nextPage();
// 表示する文字列を設定(複数ページ設定可能)
void setTexts(const vector<string> &texts);
// 枠の大きさを設定(マイナスで非表示)
void setFrame(ofVec2f frame);
// 表示するページ数を設定
void setPage(int pageNum);
// 全ページ表示完了したかを返す
bool isFinished();
// テキストの表示色を設定
void setTextColor(ofColor textColor);
// 枠の表示色を設定
void setFrameColor(ofColor bgColor, ofColor strokeColor);
private:
vector<string> texts;
ofVec2f frame;
int pageNum;
ofxSerif serif;
ofxTrueTypeFontUC font;
bool finished;
ofColor textColor;
ofColor bgColor;
ofColor strokeColor;
};
#endif /* defined(__example__ofxSerifWindow__) */
| 26.145455 | 102 | 0.650904 |
d881d0238c05800ffa25ff38e1b0b57612d9fa1f | 6,452 | c | C | it2drivers/sb16_m.c | 8bitbubsy/it2play | 7171058b5ffe3c5b16d4a08ee113184911163d9d | [
"BSD-3-Clause"
] | 13 | 2022-01-23T18:55:54.000Z | 2022-02-16T13:50:18.000Z | it2drivers/sb16_m.c | sagamusix/it2play | 92e1ac1a7c26785373336a779f14383d4a8ac2cc | [
"BSD-3-Clause"
] | null | null | null | it2drivers/sb16_m.c | sagamusix/it2play | 92e1ac1a7c26785373336a779f14383d4a8ac2cc | [
"BSD-3-Clause"
] | 2 | 2022-01-23T18:55:46.000Z | 2022-01-24T00:51:29.000Z | #include <stdint.h>
#include <stdbool.h>
#include "../it_structs.h"
#include "../it_music.h"
#include "sb16_m.h"
static void M32Mix8(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix16(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix8S(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix16S(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix8I(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix16I(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix8IS(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
static void M32Mix16IS(slaveChn_t *sc, int32_t *mixBufPtr, int32_t numSamples);
#define Get32Bit8Waveform \
sample = smp[0]; \
sample2 = smp[1]; \
sample2 -= sample; \
sample2 *= (int32_t)sc->SmpError; \
sample2 >>= MIX_FRAC_BITS-8; \
sample <<= 8; \
sample += sample2;
#define Get32Bit16Waveform \
sample = smp[0]; \
sample2 = smp[1]; \
sample2 -= sample; \
sample2 >>= 1; \
sample2 *= (int32_t)sc->SmpError; \
sample2 >>= MIX_FRAC_BITS-1; \
sample += sample2;
#define UpdatePos \
sc->SmpError += Driver.Delta; \
smp += (int32_t)sc->SmpError >> MIX_FRAC_BITS; \
sc->SmpError &= MIX_FRAC_MASK;
#define M32Mix8_M \
sample = *smp << 8; \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) -= sample * sc->RightVolume; \
UpdatePos
#define M32Mix16_M \
sample = *smp; \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) -= sample * sc->RightVolume; \
UpdatePos
#define M32Mix8S_M \
sample = *smp << 8; \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) += sample * sc->RightVolume; \
UpdatePos
#define M32Mix16S_M \
sample = *smp; \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) += sample * sc->RightVolume; \
UpdatePos
#define M32Mix8I_M \
Get32Bit8Waveform \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) -= sample * sc->RightVolume; \
UpdatePos
#define M32Mix16I_M \
Get32Bit16Waveform \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) -= sample * sc->RightVolume; \
UpdatePos
#define M32Mix8IS_M \
Get32Bit8Waveform \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) += sample * sc->RightVolume; \
UpdatePos
#define M32Mix16IS_M \
Get32Bit16Waveform \
(*MixBufPtr++) -= sample * sc->LeftVolume; \
(*MixBufPtr++) += sample * sc->RightVolume; \
UpdatePos
const mixFunc SB16_MixFunctionTables[8] =
{
(mixFunc)M32Mix8,
(mixFunc)M32Mix16,
(mixFunc)M32Mix8S,
(mixFunc)M32Mix16S,
(mixFunc)M32Mix8I,
(mixFunc)M32Mix16I,
(mixFunc)M32Mix8IS,
(mixFunc)M32Mix16IS
};
void M32Mix8(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int8_t *base = (int8_t *)sc->SmpOffs->Data;
const int8_t *smp = base + sc->SamplingPosition;
int32_t sample;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix8_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix8_M
M32Mix8_M
M32Mix8_M
M32Mix8_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix16(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int16_t *base = (int16_t *)sc->SmpOffs->Data;
const int16_t *smp = base + sc->SamplingPosition;
int32_t sample;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix16_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix16_M
M32Mix16_M
M32Mix16_M
M32Mix16_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix8S(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int8_t *base = (int8_t *)sc->SmpOffs->Data;
const int8_t *smp = base + sc->SamplingPosition;
int32_t sample;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix8S_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix8S_M
M32Mix8S_M
M32Mix8S_M
M32Mix8S_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix16S(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int16_t *base = (int16_t *)sc->SmpOffs->Data;
const int16_t *smp = base + sc->SamplingPosition;
int32_t sample;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix16S_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix16S_M
M32Mix16S_M
M32Mix16S_M
M32Mix16S_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix8I(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int8_t *base = (int8_t *)sc->SmpOffs->Data;
const int8_t *smp = base + sc->SamplingPosition;
int32_t sample, sample2;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix8I_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix8I_M
M32Mix8I_M
M32Mix8I_M
M32Mix8I_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix16I(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int16_t *base = (int16_t *)sc->SmpOffs->Data;
const int16_t *smp = base + sc->SamplingPosition;
int32_t sample, sample2;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix16I_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix16I_M
M32Mix16I_M
M32Mix16I_M
M32Mix16I_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix8IS(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int8_t *base = (int8_t *)sc->SmpOffs->Data;
const int8_t *smp = base + sc->SamplingPosition;
int32_t sample, sample2;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix8IS_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix8IS_M
M32Mix8IS_M
M32Mix8IS_M
M32Mix8IS_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
void M32Mix16IS(slaveChn_t *sc, int32_t *MixBufPtr, int32_t NumSamples)
{
const int16_t *base = (int16_t *)sc->SmpOffs->Data;
const int16_t *smp = base + sc->SamplingPosition;
int32_t sample, sample2;
for (int32_t i = 0; i < (NumSamples & 3); i++)
{
M32Mix16IS_M
}
NumSamples >>= 2;
for (int32_t i = 0; i < NumSamples; i++)
{
M32Mix16IS_M
M32Mix16IS_M
M32Mix16IS_M
M32Mix16IS_M
}
sc->SamplingPosition = (int32_t)(smp - base);
}
| 22.879433 | 80 | 0.643831 |
d882fee9b67ccde44bf894303aca145b524f8e70 | 723 | h | C | MMPasswordKeyBoard/Classes/MMPassWordTextField.h | mumuwanglin/MMPasswordKeyBoard | 8e26e027844d1f6d2bf83d2596f4f37d3d9f7226 | [
"MIT"
] | null | null | null | MMPasswordKeyBoard/Classes/MMPassWordTextField.h | mumuwanglin/MMPasswordKeyBoard | 8e26e027844d1f6d2bf83d2596f4f37d3d9f7226 | [
"MIT"
] | null | null | null | MMPasswordKeyBoard/Classes/MMPassWordTextField.h | mumuwanglin/MMPasswordKeyBoard | 8e26e027844d1f6d2bf83d2596f4f37d3d9f7226 | [
"MIT"
] | null | null | null | //
// MMPassWordTextField.h
// TestDemo
//
// Created by 王林 on 2018/8/31.
// Copyright © 2018年 王林. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol MMPassWordTextFieldDegegate <NSObject>
- (void)getKeyBoardData:(NSString *)keyBoardData;
- (void)textChanged:(NSString*)text keyboard:(id)keyboard;
- (void)doneClick:(NSString *)resultStr;
- (void)deleteClickKeyboard:(id)keyboard;
@end
@interface MMPassWordTextField : UITextField
@property (nonatomic, weak) id<MMPassWordTextFieldDegegate> ptfDelegate;
/**
初始化方法
@param frame 设置大小
@param needDoneButton 是否需要完成键盘
@param security 是否混乱键盘
*/
- (instancetype)initWithFrame:(CGRect)frame needDoneButton:(BOOL)needDoneButton isSecurity:(BOOL)security;
@end
| 23.322581 | 106 | 0.759336 |
d8846ecdb52b9183f80a877afa633037b03e891b | 3,568 | h | C | STF/Interface/Types/STFArray.h | rerunner/STCM_driver | 8fef3dd7327812fd317fdb0e6fab8d36e345a505 | [
"BSD-3-Clause"
] | null | null | null | STF/Interface/Types/STFArray.h | rerunner/STCM_driver | 8fef3dd7327812fd317fdb0e6fab8d36e345a505 | [
"BSD-3-Clause"
] | null | null | null | STF/Interface/Types/STFArray.h | rerunner/STCM_driver | 8fef3dd7327812fd317fdb0e6fab8d36e345a505 | [
"BSD-3-Clause"
] | null | null | null | ///
/// @brief
///
#ifndef STFARRAY_H
#define STFARRAY_H
#include "STF/Interface/Types/STFBasicTypes.h"
#include "STF/Interface/Types/STFResult.h"
#include <assert.h>
/// @class STFIntArray
///
/// @brief this class is not tested! use at own risk
///
class STFIntArray
{
protected:
uint32 size;
uint32 numElements;
int32 * data;
public:
STFIntArray(uint32 initialSize)
{
assert(initialSize > 0);
size = initialSize;
numElements = 0;
data = new int32[initialSize];
};
~STFIntArray()
{
if (data)
delete[] data;
};
/// this function is not tested.
/// @todo at least setting empty fields to 0 is missing
STFResult Add(int32 adddata)
{
if (numElements == size)
{
int32 * newData = new int32[numElements * 2];
memcpy(newData, data, numElements*sizeof(uint32));
size *= 2;
delete[] data;
data = newData;
};
data[numElements++] = adddata;
STFRES_RAISE_OK;
};
/// this function is not tested.
/// @todo at least setting empty fields to 0 is missing
STFResult SetAt(uint32 at, int32 setdata)
{
if (at >= size)
{
size = at + 1;
int32 * newData = new int32[size];
memcpy(newData, data, numElements*sizeof(uint32));
numElements = at;
delete[] data;
data = newData;
}
data[at] = setdata;
STFRES_RAISE_OK;
};
STFResult ElementAt(uint32 at, int32 & atdata) const
{
if (at < numElements)
{
atdata = data[at];
}
else
{
STFRES_RAISE(STFRES_OBJECT_NOT_FOUND);
}
STFRES_RAISE_OK;
};
uint32 Size() const
{
return numElements;
}
};
/// @class STFPointerArray
///
/// @brief an dynamic array of pointers
///
/// this implementation is not thread-safe!
///
class STFPointerArray
{
protected:
uint32 size;
uint32 numElements;
pointer * data;
public:
/// @brief constructor
///
/// @param initialSize the initial Size of the internal Array.
///
STFPointerArray(uint32 initialSize)
{
//ASSERT(initialSize > 0);
size = initialSize;
numElements = 0;
data = new pointer[initialSize];
};
~STFPointerArray()
{
if (data)
delete[] data;
};
/// @brief adds a new pointer.
///
/// Adds a pointer to the end of the array, if the array is to small, its size
/// is doubled.
///
STFResult Add(pointer adddata)
{
if (numElements == size)
{
pointer * newData = new pointer[numElements * 2];
memset(newData,0,numElements * 2);
memcpy(newData, data, numElements * 4);
size *= 2;
delete[] data;
data = newData;
};
data[numElements++] = adddata;
STFRES_RAISE_OK;
};
STFResult SetAt(uint32 at, pointer setdata)
{
if (at >= size)
{
size = at + 1;
pointer * newData = new pointer[size];
memset(newData, 0, size * 4);
memcpy(newData, data, numElements * 4);
numElements = at + 1;
delete[] data;
data = newData;
}
data[at] = setdata;
STFRES_RAISE_OK;
};
/// @brief selects a pointer
///
/// puts the pointer of element at into atdata
///
/// @param at the index of the element
/// @param atdata the pointer to fill.
///
STFResult ElementAt(uint32 at, pointer & atdata) const
{
if (at < numElements)
{
atdata = data[at];
}
else
{
STFRES_RAISE(STFRES_OBJECT_NOT_FOUND);
}
STFRES_RAISE_OK;
};
/// @brief returns the number of Elements.
uint32 Size() const
{
return numElements;
}
};
#endif //STFARRAY_H
| 17.84 | 81 | 0.598655 |
d88a5d50457ff38a96a9160bb2ec078ff0a3e533 | 147 | h | C | project813/src/component242/headers/component242/lib2.h | gradle/perf-native-large | af00fd258fbe9c7d274f386e46847fe12062cc71 | [
"Apache-2.0"
] | 2 | 2016-11-23T17:25:24.000Z | 2016-11-23T17:25:27.000Z | project813/src/component242/headers/component242/lib2.h | gradle/perf-native-large | af00fd258fbe9c7d274f386e46847fe12062cc71 | [
"Apache-2.0"
] | 15 | 2016-09-15T03:19:32.000Z | 2016-09-17T09:15:32.000Z | project813/src/component242/headers/component242/lib2.h | gradle/perf-native-large | af00fd258fbe9c7d274f386e46847fe12062cc71 | [
"Apache-2.0"
] | 2 | 2019-11-09T16:26:55.000Z | 2021-01-13T10:51:09.000Z | #ifndef PROJECT_HEADER_component242_2_H
#define PROJECT_HEADER_component242_2_H
int component242_2();
#endif // PROJECT_HEADER_component242_2_H | 18.375 | 41 | 0.863946 |
d88dcab89e399a5952139d18b1113c623ace53a7 | 96 | h | C | analyzer/diagnoser/rdef_sideband_elf.h | vusec/probeguard | 37d2a554e7a757cbb6f6f87ebd27744765b32f3a | [
"BSD-2-Clause"
] | 7 | 2019-04-17T03:29:21.000Z | 2020-05-25T10:24:10.000Z | analyzer/diagnoser/rdef_sideband_elf.h | vusec/probeguard | 37d2a554e7a757cbb6f6f87ebd27744765b32f3a | [
"BSD-2-Clause"
] | null | null | null | analyzer/diagnoser/rdef_sideband_elf.h | vusec/probeguard | 37d2a554e7a757cbb6f6f87ebd27744765b32f3a | [
"BSD-2-Clause"
] | 2 | 2019-04-27T12:17:33.000Z | 2021-11-19T23:15:43.000Z | struct pt_image;
int read_elf(char *fn, struct pt_image *decoder, uint64_t base, uint64_t cr3);
| 32 | 78 | 0.78125 |
d89028e08a89d7934fbfcf8375c6f8c7aff9abf9 | 512 | c | C | 2021/c/2102.c | Chrinkus/advent-of-code | b2ae137dc7a1d6fc9e20f29549e891404591c47f | [
"MIT"
] | 1 | 2021-12-04T20:55:02.000Z | 2021-12-04T20:55:02.000Z | 2021/c/2102.c | Chrinkus/advent-of-code | b2ae137dc7a1d6fc9e20f29549e891404591c47f | [
"MIT"
] | null | null | null | 2021/c/2102.c | Chrinkus/advent-of-code | b2ae137dc7a1d6fc9e20f29549e891404591c47f | [
"MIT"
] | null | null | null | #include <stdlib.h>
#include <stdio.h>
#include "aoc_banner.h"
enum { BUFFMAX = 8 };
int main()
{
aoc_banner_2021("02", "Dive!");
int x = 0, y1 = 0, y2 = 0; // aim == y1
char buff[BUFFMAX];
for (int n; scanf("%s %d", buff, &n) == 2; )
switch (buff[0]) {
case 'f':
x += n;
y2 += y1 * n;
break;
case 'u':
y1 -= n;
break;
case 'd':
y1 += n;
break;
}
printf(TCINV "Part 1:" TCRINV " %d\n", x * y1);
printf(TCINV "Part 2:" TCRINV " %d\n", x * y2);
return EXIT_SUCCESS;
}
| 14.628571 | 48 | 0.511719 |
d892ef762b4dc635f700fe9f31da8a7913de2639 | 2,204 | h | C | include/EKF-SLAM-Example/visualization/BackendRos2.h | adamek727/EKF-SLAM-Example | 53676e07300c3aa4b813906cc4ac36191c391c1f | [
"MIT"
] | null | null | null | include/EKF-SLAM-Example/visualization/BackendRos2.h | adamek727/EKF-SLAM-Example | 53676e07300c3aa4b813906cc4ac36191c391c1f | [
"MIT"
] | null | null | null | include/EKF-SLAM-Example/visualization/BackendRos2.h | adamek727/EKF-SLAM-Example | 53676e07300c3aa4b813906cc4ac36191c391c1f | [
"MIT"
] | null | null | null | #pragma once
#include <rclcpp/rclcpp.hpp>
#include <visualization_msgs/msg/marker.hpp>
#include <visualization_msgs/msg/marker_array.hpp>
#include <sensor_msgs/msg/image.hpp>
class BackendRos2 {
public:
BackendRos2(std::shared_ptr<rclcpp::Node> node)
: node_{node} {
}
void visualize(const visualization_msgs::msg::Marker& marker, const std::string& topic) {
if (marker_publishers_.count(topic) == 0) {
marker_publishers_[topic] = node_->create_publisher<visualization_msgs::msg::Marker>(topic, 0);
}
marker_publishers_[topic]->publish(marker);
}
void visualize(const visualization_msgs::msg::MarkerArray& markerArray, const std::string& topic) {
if (marker_array_publishers_.count(topic) == 0) {
marker_array_publishers_[topic] = node_->create_publisher<visualization_msgs::msg::MarkerArray>(topic, 0);
}
marker_array_publishers_[topic]->publish(markerArray);
}
void visualize(const geometry_msgs::msg::PoseWithCovarianceStamped& pose_with_cov, const std::string& topic) {
if (pose_with_cov_stamp_publishers_.count(topic) == 0) {
pose_with_cov_stamp_publishers_[topic] = node_->create_publisher<geometry_msgs::msg::PoseWithCovarianceStamped>(topic, 0);
}
pose_with_cov_stamp_publishers_[topic]->publish(pose_with_cov);
}
void visualize(const sensor_msgs::msg::Image& image, const std::string& topic) {
if (image_publishers_.count(topic) == 0) {
image_publishers_[topic] = node_->create_publisher<sensor_msgs::msg::Image>(topic, 0);
}
image_publishers_[topic]->publish(image);
}
private:
std::shared_ptr<rclcpp::Node> node_;
std::map<std::string, rclcpp::Publisher<visualization_msgs::msg::Marker>::SharedPtr> marker_publishers_;
std::map<std::string, rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr> marker_array_publishers_;
std::map<std::string, rclcpp::Publisher<geometry_msgs::msg::PoseWithCovarianceStamped>::SharedPtr> pose_with_cov_stamp_publishers_;
std::map<std::string, rclcpp::Publisher<sensor_msgs::msg::Image>::SharedPtr> image_publishers_;
}; | 41.584906 | 135 | 0.709619 |
d894349dea65c27a20d51399db0fc8f6e260bde0 | 3,561 | c | C | converter/util.c | tajmone/alan | b76a03eed8b567a130352bea4781203bcf693286 | [
"Artistic-2.0"
] | 12 | 2019-07-30T23:25:12.000Z | 2021-09-07T08:06:10.000Z | converter/util.c | tajmone/alan | b76a03eed8b567a130352bea4781203bcf693286 | [
"Artistic-2.0"
] | 40 | 2019-08-01T09:12:47.000Z | 2022-01-09T18:09:51.000Z | converter/util.c | tajmone/alan | b76a03eed8b567a130352bea4781203bcf693286 | [
"Artistic-2.0"
] | 2 | 2021-04-21T13:23:10.000Z | 2022-02-21T19:27:45.000Z | /*----------------------------------------------------------------------*\
util.c
Alan compiler utilities unit
\*----------------------------------------------------------------------*/
#include "util.h"
/* IMPORTS */
#include "sysdep.h"
#include "lmList.h"
/* PUBLIC DATA */
Srcp nulsrcp /* NULL position for list */
= {0,0,0};
Bool verbose; /* Verbose output */
long counter; /* And counter for verbose mode */
long allocated; /* Calculated memory usage */
/* PRIVATE DATA */
/* FUNCTIONS */
/*======================================================================
showProgress()
*/
void showProgress() {
if (verbose) {
printf("%8ld\b\b\b\b\b\b\b\b", counter++);
fflush(stdout);
}
}
/*======================================================================*/
char *strlow(char str[]) /* INOUT - Native string to convert */
{
char *s;
for (s = str; *s; s++)
*s = tolower((int)*s);
return(str);
}
/*======================================================================
allocate()
Safely allocate new memory.
*/
void *allocate(int lengthInBytes) /* IN - Length to allocate */
{
void *p = calloc(1, (size_t)lengthInBytes);
if (p == NULL)
panic("Out of memory");
allocated += lengthInBytes;
return p;
}
/*======================================================================
unimpl()
An unimplemented constrution was encountered.
*/
void unimpl(Srcp *srcp, /* IN - Where? */
char *phase) /* IN - What phase? */
{
lmLog(srcp, 998, sevWAR, phase);
}
/*======================================================================*/
void syserr(char *errorMessage, char insertString[])
{
char *messageString;
int len = 0;
len = strlen(errorMessage);
len += insertString?strlen(insertString)+1:0;
messageString = allocate(len);
if (insertString) {
messageString = allocate(strlen(errorMessage)+strlen(insertString)+1);
sprintf(messageString, errorMessage, insertString);
} else {
messageString = allocate(strlen(errorMessage)+1);
sprintf(messageString, "%s", errorMessage);
}
lmLog(&nulsrcp, 997, sevSYS, messageString);
lmList("", 0, 79, liTINY, sevALL);
terminate(EXIT_FAILURE);
}
/*======================================================================
panic()
A catastrophe has happened. Print message but do as little as possible.
*/
void panic(char *str)
{
printf("PANIC!! %s\n", str);
terminate(EXIT_FAILURE);
}
/*======================================================================
terminate()
Terminate the program with an error code.
*/
void terminate(int ecode)
{
#ifdef __MWERKS__
printf("Command-Q to quit.");
#endif
exit(ecode);
}
/*======================================================================*/
void onlyOneSpace(char string[])
{
int from = 0;
int to = 0;
char *p;
/* Convert all non-blank to white space */
while((p=strpbrk(string,"\t\n\r"))!=NULL)
*p=' ';
while (string[from] != '\0') {
/* Copy until we find a double blank, from will point to first blank */
while (string[from] != '\0' && !(isspace((int)string[from]) && isspace((int)string[from+1]))) {
string[to++] = string[from++];
}
/* If we are not at the end of the string, skip all spaces except the first */
if (string[from] != '\0') {
string[to++] = string[from++];
while (isspace((int)string[from]))
from++;
}
}
/* Terminate */
string[to] = '\0';
}
| 20.465517 | 103 | 0.472058 |
d894b359a2ed623c51d5c29a1ededb210afbe728 | 419 | h | C | Lights/DiffuseLight.h | DarrenSweeney/Dazzer_Ray | 535708d9320efede9e60d1d24e9272bcd2ddadc0 | [
"MIT"
] | 26 | 2017-07-20T15:55:56.000Z | 2019-12-15T08:19:56.000Z | Lights/DiffuseLight.h | DarrenSweeney/Dazzer_Ray | 535708d9320efede9e60d1d24e9272bcd2ddadc0 | [
"MIT"
] | 1 | 2019-05-06T04:25:16.000Z | 2019-05-06T22:02:24.000Z | Lights/DiffuseLight.h | DarrenSweeney/Dazzer_Ray | 535708d9320efede9e60d1d24e9272bcd2ddadc0 | [
"MIT"
] | 3 | 2017-09-25T08:45:43.000Z | 2021-01-11T06:50:55.000Z | #ifndef DIFFUSE_LIGHT_H
#define DIFFUSE_LIGHT_H
#include "..\Materials\Material.h"
#include "..\Textures\Texture.h"
class DiffuseLight : public Material
{
public:
DiffuseLight(Texture *texture);
bool Scatter(const Ray &rayIn, const HitRecord &hitRecord, Vector3 &attenuation, Ray &scattered) const override;
Vector3 Emitted(Vector2 uv, const Vector3 &p) const override;
private:
Texture *emitTexture;
};
#endif | 22.052632 | 113 | 0.768496 |
d894b64f4614a7eda62268046937e25ed6d535ef | 865 | h | C | PrivateFrameworks/iWorkImport.framework/TSPFilePackage.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 36 | 2016-04-20T04:19:04.000Z | 2018-10-08T04:12:25.000Z | PrivateFrameworks/iWorkImport.framework/TSPFilePackage.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | null | null | null | PrivateFrameworks/iWorkImport.framework/TSPFilePackage.h | shaojiankui/iOS10-Runtime-Headers | 6b0d842bed0c52c2a7c1464087b3081af7e10c43 | [
"MIT"
] | 10 | 2016-06-16T02:40:44.000Z | 2019-01-15T03:31:45.000Z | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport
*/
@interface TSPFilePackage : TSPPackage {
TSUZipArchive * _componentZipArchive;
}
+ (bool)isValidPackageAtURL:(id)arg1;
+ (bool)isValidPackageAtZipArchive:(id)arg1;
+ (unsigned long long)zipArchiveOptions;
+ (id)zipArchiveURLFromPackageURL:(id)arg1;
- (void).cxx_destruct;
- (id)componentZipArchive;
- (bool)didReloadZipArchive:(id)arg1 error:(id*)arg2;
- (bool)hasDataAtRelativePath:(id)arg1;
- (id)newDataStorageAtRelativePath:(id)arg1 decryptionInfo:(id)arg2;
- (id)newDocumentPropertiesWithURL:(id)arg1 zipProvider:(id /* block */)arg2 error:(id*)arg3;
- (id)newRawDataReadChannelAtRelativePath:(id)arg1;
- (long long)packageType;
- (void)prepareForDocumentReplacementWithSuccess:(bool)arg1 forSafeSave:(bool)arg2 originalURL:(id)arg3;
@end
| 34.6 | 104 | 0.781503 |
d8997200a984865f4b53e75f79e8e1281d8f59e4 | 120 | h | C | src/csv.h | bitcharmer/jitter-sampler | a87459fa964ff5fe7f67402cc2ecf86b696375a6 | [
"MIT"
] | 1 | 2018-02-21T20:29:36.000Z | 2018-02-21T20:29:36.000Z | src/csv.h | bitcharmer/jitter-sampler | a87459fa964ff5fe7f67402cc2ecf86b696375a6 | [
"MIT"
] | null | null | null | src/csv.h | bitcharmer/jitter-sampler | a87459fa964ff5fe7f67402cc2ecf86b696375a6 | [
"MIT"
] | null | null | null | #include "jitter.h"
#ifndef JITTER_SAMPLER_CSV_H
#define JITTER_SAMPLER_CSV_H
process_output init_csv(char*);
#endif
| 13.333333 | 31 | 0.808333 |
d899720bd362a01e39bb73ede0f160ff04bb2ad5 | 1,999 | h | C | Queue.h | pythoncat1024/cpptraining | ff74c64ed74404aa8300aa5ee7dd4b666437c212 | [
"MIT"
] | null | null | null | Queue.h | pythoncat1024/cpptraining | ff74c64ed74404aa8300aa5ee7dd4b666437c212 | [
"MIT"
] | 3 | 2017-12-09T11:03:57.000Z | 2018-01-02T16:55:22.000Z | Queue.h | pythoncat1024/cpptraining | ff74c64ed74404aa8300aa5ee7dd4b666437c212 | [
"MIT"
] | null | null | null | //
// Created by cat on 2018/1/19.
//
#ifndef CPP02_QUEUE_H
#define CPP02_QUEUE_H
/**
* 通过 模板类实现 队列 (内部使用链表实现)
* 队列(FIFO) --> 先进先出
* @tparam V
*/
template<typename V>
class Queue {
private:
struct Node {
Node *next;
V data;
};
unsigned int max;
int length; // 实际上可以不需要这个变量
Node *front; // 头指针
Node *rear; // 尾指针
public:
Queue(unsigned int max)
: max(max), front(nullptr), rear(nullptr) {
this->length = 0;
}
virtual ~Queue() {
while (this->front) {
this->pop();
}
}
unsigned long size() const { return isEmpty() ? 0 : 1 + this->rear - this->front; }
bool isFull() const;
bool isEmpty() const { return this->front == nullptr; }
/**
* add a data 2 queue
* @param data
* @return true if push ok ,else false
*/
bool push(const V &data);
/**
* pop the first from the queue
* @return true if pop ok, else false
*/
bool pop();
};
template<typename V>
bool Queue<V>::isFull() const {
if (isEmpty() && this->max == 0) return true;
return (this->rear - this->front) == this->max;
}
template<typename V>
bool Queue<V>::push(const V &data) {
if (isFull()) {
// has no room 2 place the newly data
return false;
}
Node *node = new Node;
node->next = nullptr;
node->data = data;
if (isEmpty()) {
this->front = node;
this->rear = node;
} else {
// add to the last
this->rear->next = node;
this->rear = node;
}
this->length += 1;
return true;
}
template<typename V>
bool Queue<V>::pop() {
if (isEmpty()) {
return false;
}
if (this->front == this->rear) {
delete this->front;
this->front = this->rear = nullptr;
} else {
Node *drop = this->front;
this->front = drop->next;
delete drop;
}
this->length -= 1;
return false;
}
#endif //CPP02_QUEUE_H
| 18.682243 | 87 | 0.527764 |
d89b70c52485b345339d75581d09c377c84bb35a | 3,763 | c | C | stack/postfix-c/postfix2.c | pythonpeixun/algo-1 | 05c5f727bbe82185ec969bd4c6caa713ca7c34e5 | [
"MIT"
] | 36 | 2017-01-15T07:52:21.000Z | 2022-01-18T04:00:57.000Z | stack/postfix-c/postfix2.c | pythonpeixun/algo-1 | 05c5f727bbe82185ec969bd4c6caa713ca7c34e5 | [
"MIT"
] | 10 | 2016-11-28T05:21:25.000Z | 2017-03-17T02:07:58.000Z | stack/postfix-c/postfix2.c | wangxintao2002/algo | 05c5f727bbe82185ec969bd4c6caa713ca7c34e5 | [
"MIT"
] | 8 | 2019-05-15T03:48:41.000Z | 2022-02-15T12:34:52.000Z | #include "postfix2.h"
/* The algorithm used is called "Shunting-yard" algorithm
* see more: https://en.wikipedia.org/wiki/Shunting-yard_algorithm
* Operator precedence assumed (from highest to lowest):
* ()
* ^
* *, /
* +, -
*/
void
infixTopostfix(char* filename)
{
int maxElements = 20;
Stack s = createStack(maxElements);
FILE *fp;
fp = fopen(filename, "r");
if (fp == NULL)
{
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
int c;
char* tmp = malloc(sizeof(char));
while((c=getc(fp)) != EOF)
{
/* printf("character c read: "); */
/* putc(c, stdout); */
/* printf("\n"); */
if(isalpha(c) || isdigit(c))
{
putchar(c);
}
else
{
switch(c)
{
case ' ':
break;
case '-':
case '+':
while(!isEmpty(s) && strcmp(top(s),"("))
{
putchar(topAndPop(s)[0]);
}
tmp[0] = c;
push(tmp, s);
break;
case '/':
case '*':
if (isEmpty(s) ||
!strcmp(top(s),"+") ||
!strcmp(top(s),"-") ||
!strcmp(top(s),"(")
)
{
tmp[0] = c;
push(tmp, s);
}
else
{
while (strcmp(top(s),"(") && !isEmpty(s))
{
putchar(topAndPop(s)[0]);
}
tmp[0] = c;
push(tmp, s);
}
break;
case '(':
tmp[0] = c;
push(tmp, s);
break;
case ')':
while(strcmp(top(s),"("))
{
putchar(topAndPop(s)[0]);
}
pop(s); //remove '('
break;
case '^':
tmp[0] = c;
push(tmp, s); // by assumption, there is no operator has higher precedence than '^', so we push directly
break;
default:
fprintf(stderr, "Invalid operator %c in expression\n", c);
exit(1);
}
}
//printStack(s);
//printf("TopOfStack: %d\n", getTopOfStack(s));
}
while(!isEmpty(s))
{
putchar(topAndPop(s)[0]);
}
disposeStack(s);
free(tmp);
printf("\n");
}
void
postfixToinfix(char* filename)
{
int maxElements = 20;
FILE *fp;
fp = fopen(filename, "r");
if (fp == NULL)
{
fprintf(stderr, "can't open %s\n", filename);
exit(1);
}
int c, lenA, lenB;
char* tmp = malloc(sizeof(char));
char* tmp2;
char* a;
char* b;
Stack s = createStack(maxElements);
while((c=getc(fp)) != EOF)
{
/* printf("character c read: "); */
/* putc(c, stdout); */
/* printf("\n"); */
if(isdigit(c) || isalpha(c))
{
tmp[0] = c;
push(tmp, s);
}
else
{
switch(c)
{
case '^':
case '/':
case '*':
case '+':
case '-':
a = topAndPop(s);
lenA = strlen(a);
//printf("a: %s with length: %d\n", a, lenA);
b = topAndPop(s);
lenB = strlen(b);
//printf("b: %s with length: %d\n", b, lenB);
tmp2 = malloc((lenA+lenB+3)*sizeof(char)); // 1 for c, 2 for '(' and ')', so total is 3
strcpy(tmp2, "(");
strcat(tmp2, b);
//printf("tmp2: %s\n", tmp2);
tmp[0] = c;
strcat(tmp2,tmp);
//printf("tmp2: %s\n", tmp2);
strcat(tmp2,a);
//printf("tmp2: %s\n", tmp2);
strcat(tmp2, ")");
push(tmp2, s);
free(tmp2);
break;
case ' ':
break;
default:
fprintf(stderr, "Invalid operator in the file\n");
exit(1);
}
}
//printStack(s);
}
printf(topAndPop(s));
disposeStack(s);
fclose(fp);
}
| 22.135294 | 114 | 0.431571 |
d89c4edf528890064b34354c531d18c9a418c038 | 3,350 | h | C | ui/FileView.h | Teemperor/troll | 42c55543357cff9949bab165ff678284835e2eee | [
"Apache-2.0"
] | null | null | null | ui/FileView.h | Teemperor/troll | 42c55543357cff9949bab165ff678284835e2eee | [
"Apache-2.0"
] | null | null | null | ui/FileView.h | Teemperor/troll | 42c55543357cff9949bab165ff678284835e2eee | [
"Apache-2.0"
] | null | null | null | #ifndef TROLL_FILEVIEW_H
#define TROLL_FILEVIEW_H
#include <curses.h>
#include "File.h"
#include "ColorString.h"
#include "CppHighlighter.h"
class FileView {
int scrollPos_ = 1;
int cursorLine = 1;
int cursor = 0;
File *file_ = nullptr;
int x_ = 0;
int y_ = 0;
int width_ = 20;
int height_ = 20;
ColorString highlight(const std::string &line) {
return CppHighlighter::highlight(line);
}
public:
FileView(int x, int y, int width, int height)
: x_(x), y_(y), width_(width), height_(height) {
}
void resize(int x, int y, int w, int h) {
x_ = x;
y_ = y;
width_ = w;
height_ = h;
}
void setFile(File *file) {
file_ = file;
scrollPos_ = 1;
}
bool isPrintChar(char c) {
return !isSpace(c) && isprint(c);
}
bool isSpace(char c) {
return c == ' ' || c == '\t';
}
char currentCharOrSpaceEnd() {
if (cursor == getCurrentLine().content().size())
return ' ';
return currentChar();
}
char currentChar() {
if (cursor < getCurrentLine().content().size())
return getCurrentLine().content().at(cursor);
return 0;
}
void selectWord(int direction) {
while (isPrintChar(currentCharOrSpaceEnd()))
if (!moveCursorX(direction))
break;
while (isSpace(currentCharOrSpaceEnd()))
if (!moveCursorX(direction))
break;
}
void writeChar(char c) {
getCurrentLine().insert(c, cursor);
moveCursorX(1);
}
void delChar() {
moveCursorX(-1);
getCurrentLine().erase(cursor);
}
void scrollView(long diff) {
scrollPos_ += diff;
if (scrollPos_ < 1)
scrollPos_ = 1;
}
bool moveCursorX(int dx) {
auto oldValue = cursor;
cursor += dx;
cursor = std::max(0, cursor);
cursor = std::min(cursor, (int) getCurrentLine().content().size());
return oldValue != cursor;
}
bool moveCursorY(int dy) {
cursorLine += dy;
if (cursorLine < 1) {
cursorLine = 1;
return false;
}
if (cursorLine > file_->content().linecount()) {
cursorLine = file_->content().linecount();
return false;
}
cursor = std::min(cursor, (int) getCurrentLine().content().size());
if (cursorLine > scrollPos_ + height_) {
scrollPos_ = cursorLine - height_;
} else if (cursorLine < scrollPos_) {
scrollPos_ = cursorLine;
}
return true;
}
Line &getCurrentLine() {
return file_->content().line(cursorLine);
}
void skipDown() {
moveCursorY(1);
while (moveCursorY(1)) {
if (getCurrentLine().onlyWhitespace()) {
moveCursorY(-1);
break;
}
}
}
void skipUp() {
moveCursorY(-1);
while (moveCursorY(-1)) {
if (getCurrentLine().onlyWhitespace()) {
moveCursorY(1);
break;
}
}
}
void display() {
for (int i = 0; i <= height_; i++) {
int lineIndex = i + scrollPos_;
if (lineIndex < file_->content().linecount()) {
std::string line = file_->content().line(lineIndex).content();
ColorString str = highlight(line);
if (lineIndex == cursorLine) {
str.setCursor(cursor);
}
str.display(x_, i, 180);
} else {
std::string line;
line.resize(180, ' ');
mvprintw(i, y_, "%s", line.c_str());
}
}
}
};
#endif //TROLL_FILEVIEW_H
| 20.30303 | 71 | 0.575821 |
d89fc2b79b80dc00220f28bea1f1be3f4532d544 | 386 | h | C | BlueToothAbout/BlueToothAbout/msg/ReadOnlyObj.h | fanzehua498/2018ForYou | 0bf1b3038005a06fdc46774b0e0e79cb8f3e4806 | [
"Apache-2.0"
] | null | null | null | BlueToothAbout/BlueToothAbout/msg/ReadOnlyObj.h | fanzehua498/2018ForYou | 0bf1b3038005a06fdc46774b0e0e79cb8f3e4806 | [
"Apache-2.0"
] | null | null | null | BlueToothAbout/BlueToothAbout/msg/ReadOnlyObj.h | fanzehua498/2018ForYou | 0bf1b3038005a06fdc46774b0e0e79cb8f3e4806 | [
"Apache-2.0"
] | null | null | null | //
// ReadOnlyObj.h
// BlueToothAbout
//
// Created by 知合金服-Mini on 2018/6/19.
// Copyright © 2018年 知合金服-Mini. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ReadOnlyObj : NSObject
@property (nonatomic ,readonly) NSString *read;
@property (nonatomic ,readonly,getter=isPro) NSString *proG;
@property (nonatomic ,strong,setter=issetp:) NSString *setpro;
@end
| 24.125 | 62 | 0.733161 |
d8a2baedc79033613dd45413426f2ff6eb49941e | 902 | h | C | scisim/ConstrainedMaps/ImpactMaps/LCPOperatorQL.h | Lyestria/scisim | e2c2abc8d38ea9b07717841782c5c723fce37ce5 | [
"Apache-2.0"
] | null | null | null | scisim/ConstrainedMaps/ImpactMaps/LCPOperatorQL.h | Lyestria/scisim | e2c2abc8d38ea9b07717841782c5c723fce37ce5 | [
"Apache-2.0"
] | null | null | null | scisim/ConstrainedMaps/ImpactMaps/LCPOperatorQL.h | Lyestria/scisim | e2c2abc8d38ea9b07717841782c5c723fce37ce5 | [
"Apache-2.0"
] | null | null | null | // LCPOperatorQL.h
//
// Breannan Smith
// Last updated: 09/21/2015
#ifndef LCP_OPERATOR_QL
#define LCP_OPERATOR_QL
#include "ImpactOperator.h"
class LCPOperatorQL final : public ImpactOperator
{
public:
explicit LCPOperatorQL( const scalar& eps );
explicit LCPOperatorQL( std::istream& input_stream );
virtual ~LCPOperatorQL() override = default;
virtual void flow( const std::vector<std::unique_ptr<Constraint>>& cons, const SparseMatrixsc& M, const SparseMatrixsc& Minv, const VectorXs& q0, const VectorXs& v0, const VectorXs& v0F, const SparseMatrixsc& N, const SparseMatrixsc& Q, const VectorXs& nrel, const VectorXs& CoR, VectorXs& alpha ) override;
virtual std::string name() const override;
virtual std::unique_ptr<ImpactOperator> clone() const override;
virtual void serialize( std::ostream& output_stream ) const override;
private:
const scalar m_tol;
};
#endif
| 25.055556 | 309 | 0.75388 |
d8a2f69031462d0a3d0cb712fa3ef63048be87e7 | 1,911 | h | C | 2dShooter/BloomCBuffers.h | Bigfellahull/2dShooter | 7d37bc414230eef3a7d140fc84d0d7ef56bc18e5 | [
"MIT"
] | null | null | null | 2dShooter/BloomCBuffers.h | Bigfellahull/2dShooter | 7d37bc414230eef3a7d140fc84d0d7ef56bc18e5 | [
"MIT"
] | null | null | null | 2dShooter/BloomCBuffers.h | Bigfellahull/2dShooter | 7d37bc414230eef3a7d140fc84d0d7ef56bc18e5 | [
"MIT"
] | null | null | null | #pragma once
#include "SimpleMath.h"
namespace SGS2D
{
struct BloomExtractCBuffer
{
BloomExtractCBuffer() :
BloomThreshold()
{
}
BloomExtractCBuffer(
float bloomThreshold
) :
BloomThreshold(bloomThreshold)
{
}
BloomExtractCBuffer(const BloomExtractCBuffer& other) :
BloomThreshold(other.BloomThreshold)
{
}
BloomExtractCBuffer& operator=(const BloomExtractCBuffer& other)
{
BloomThreshold = other.BloomThreshold;
return *this;
}
// The minimum brightness of a pixel in order for bloom to apply to it on a 0.0f (all pixels) to 1.0f (only 100% white pixels) scale.
float BloomThreshold;
};
// BLUR_SAMPLE_COUNT must match the value in BloomBlurPixelShader.hlsl.
const int BLUR_SAMPLE_COUNT = 15;
struct BloomBlurCBuffer
{
DirectX::SimpleMath::Vector4 SampleOffsetsAndWeights[BLUR_SAMPLE_COUNT];
};
struct BloomCombineCBuffer
{
BloomCombineCBuffer() :
CombineValues()
{
}
BloomCombineCBuffer(
float bloomIntensity,
float baseIntensity,
float bloomSaturation,
float baseSaturation
) :
CombineValues(bloomIntensity, baseIntensity, bloomSaturation, baseSaturation)
{
}
BloomCombineCBuffer(const BloomCombineCBuffer& other) :
CombineValues(other.CombineValues)
{
}
BloomCombineCBuffer& operator=(const BloomCombineCBuffer& other)
{
CombineValues = other.CombineValues;
return *this;
}
// x - BloomIntensity ; y - BaseIntensity ; z - BloomSaturation ; w - BaseSaturation
DirectX::SimpleMath::Vector4 CombineValues;
};
} | 25.824324 | 141 | 0.59079 |
d8a4248a01f47ad378394763764297b89ff241a2 | 2,997 | h | C | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcraster_aguila/qt_EventFilterSubject.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcraster_aguila/qt_EventFilterSubject.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | pcraster/pcraster-4.2.0/pcraster-4.2.0/source/pcraster_aguila/qt_EventFilterSubject.h | quanpands/wflow | b454a55e4a63556eaac3fbabd97f8a0b80901e5a | [
"MIT"
] | null | null | null | #ifndef INCLUDED_QT_EVENTFILTERSUBJECT
#define INCLUDED_QT_EVENTFILTERSUBJECT
// Library headers.
// PCRaster library headers.
// Module headers.
class QObject;
namespace qt {
// EventFilterSubject declarations.
}
namespace qt {
//! The EventFilterSubject class is for objects which are filtered by others.
/*!
The events of objects can be filtered by other objects (the event filter
objects). This means that events generated for this object are first seen
by the filter object who can do whatever it wants with it.
A filter object can retrieve the events of a filter subject by calling
redirectEventsTo(QObject*). This function will call
redirectChildEventsTo(QObject*) which can be overridden. This way
you can redirect the events of the children to the filter also. When
events should no longer be filtered you should call
removeEventFilter(QObject*), which will call removeChildEventFilter(QObject*).
\sa QObject::installEventFilter(const QObject*), QObject::eventFilter()
*/
class EventFilterSubject
{
private:
// Actual, layered filter subject.
QObject* d_filterSubject;
//! Object which filters the events of this subject.
QObject* d_filter;
//! Assignment operator. NOT IMPLEMENTED.
EventFilterSubject& operator= (const EventFilterSubject&);
//! Copy constructor. NOT IMPLEMENTED.
EventFilterSubject (const EventFilterSubject&);
protected:
QObject* eventFilterSubject () const;
const QObject* eventFilter () const;
virtual void redirectChildEventsTo(QObject* filter);
virtual void removeChildEventFilter(QObject* filter);
public:
//----------------------------------------------------------------------------
// CREATORS
//----------------------------------------------------------------------------
EventFilterSubject (QObject* filterSubject);
virtual ~EventFilterSubject ();
//----------------------------------------------------------------------------
// MANIPULATORS
//----------------------------------------------------------------------------
void redirectEventsTo (QObject* filter);
void removeEventFilter ();
//----------------------------------------------------------------------------
// ACCESSORS
//----------------------------------------------------------------------------
};
//------------------------------------------------------------------------------
// INLINE FUNCIONS
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// FREE OPERATORS
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// FREE FUNCTIONS
//------------------------------------------------------------------------------
} // namespace qt
#endif
| 26.289474 | 80 | 0.480147 |
d8a492e633d061edffd816414cf3adb56f01d456 | 748 | h | C | source/pkgsrc/databases/xsqlmenu/patches/patch-Xsqldefs.h | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/databases/xsqlmenu/patches/patch-Xsqldefs.h | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/databases/xsqlmenu/patches/patch-Xsqldefs.h | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Xsqldefs.h,v 1.1 2020/05/09 15:19:33 joerg Exp $
mysql_connect is gone.
--- Xsqldefs.h.orig 2020-05-09 01:21:30.054455724 +0000
+++ Xsqldefs.h
@@ -34,7 +34,8 @@
#define sql_list_tables(sock, wild) mysql_list_tables(sock, wild)
#define sql_list_fields(sock, table, wild) mysql_list_fields(sock, table, wild)
#define sql_select_db(sock, db) mysql_select_db(sock, db)
-#define sql_connect(sock, server, user, pass) mysql_connect(sock, server, user, pass)
+#define sql_connect(sock, server, user, pass) mysql_real_connect(sock, server, user, pass, NULL, 0, NULL, 0)
+
#define sql_query(sock, query) mysql_query(sock, query)
#define sql_close(sock) mysql_close(sock)
#define SQL_FIELD MYSQL_FIELD
| 44 | 109 | 0.713904 |
d8a54fed45a21a76cbb2388f194b023d3b29e263 | 13,167 | c | C | mylexzlibrary/src/main/c/logger.c | AlexzPurewoko/PANRI | c6a5bc0ec8753939adf81d7b9de51d4c6aff432f | [
"Apache-2.0"
] | 1 | 2018-09-03T11:58:48.000Z | 2018-09-03T11:58:48.000Z | mylexzlibrary/src/main/c/logger.c | AlexzPurewoko/PANRI | c6a5bc0ec8753939adf81d7b9de51d4c6aff432f | [
"Apache-2.0"
] | 1 | 2018-09-08T07:55:52.000Z | 2018-09-26T09:58:17.000Z | mylexzlibrary/src/main/c/logger.c | AlexzPurewoko/PANRI | c6a5bc0ec8753939adf81d7b9de51d4c6aff432f | [
"Apache-2.0"
] | null | null | null | /*
* Copyright (C) 2017 @KOPI Alexzander Purwoko Widiantoro
* All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Header File included for important function
*/
#include <stdio.h>
#include <jni.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
#include <android/log.h>
#include "MyLEXZ-Cutils/component.h"
/*******************************/
/* CONSTANT EXPRESSION */
static const jint pemisah = 0x02,
last = 0x01,
GID = 0x08,
TID = 0x0f;
/*
* Reference Variables
* used for storing integer value into memory
* and saving them
*/
static jobject integerReference;
/******/
static char sig[] = "MyLogger\0";
/*
* Convert chacacters into lowerCase
*/
/*********** Function For encrypt and decrypt ************/
int estr(int chr){
return ~(~(chr << 1) + ('a' >> 2));
}
int dstr(int chr){
return (~(~chr + ~('a'>>2))) >> 1;
}
int enm(int d){
return ( ~ ( ~ ( d << 1 ) + ~0 + ~('0' >> 3)) + ((d - '0')+(1<<3)<<3))-(5 << 1);
}
int dnum(int e){
return (((e + (5 << 1))- (1 << 3)) / ( 5 << 1)) + (1 << 5);//-(5 << 1);
}
/***********************************/
/************** LOG PRIORITY *****************/
enum PRIORITY {
ERRORS = 0x0000a,
INFO = 0x0000b,
DEBUG = 0x0000c,
VERBOSE = 0x0000d,
WARNING = 0x0000e,
FAILURE = 0x0000f
};
/************
* IMPORTANT FUNCTION !!!!!
*
*/
/*
* Time and Date structure table function
*/
struct tp {
jint millis;
jint sec;
jint min;
jint hours;
};
struct date {
jint day;
jint month;
jint years;
};
/* Function of collecting Time and date */
void check(jint *tochck, jint val, jint *hchk){
while((*tochck)> val){
(*tochck )-=(val+1);
(*hchk)++;
}
}
void totime(unsigned long int millis, struct tp *v){
v->millis = millis % 1000;
millis/=1000;
v->sec = millis%100;
millis-=v->sec;
millis/=60;
v->min = millis%60;
v->hours = millis/60;
// arg check for time
//check minutes
check(&(v->sec), 59, &(v->min));
//check hours
check(&(v->min), 59, &(v->hours));
}
void todate(jlong date, struct date *x){
x->years = date%10000;
date/=10000;
x->month = date%100;
date/=100;
x->day = date%100;
date/=100;
}
jobject jintToObject(JNIEnv* env, jint a){
jclass cls = (*env)->FindClass(env, "java/lang/Integer");
jmethodID method = (*env)->GetMethodID(env, cls, "<init>", "(I)V");
return (*env)->NewObject(env, cls, method, a);
}
jint toInt(JNIEnv* env, jobject b){
jmethodID id = (*env)->GetMethodID(env, (*env)->FindClass(env, "java/lang/Integer"), "intValue", "()I");
return (*env)->CallIntMethod(env, b, id);
}
jobject getObjFromArr(JNIEnv* env, jobjectArray arr, jint pos){
return (*env)->GetObjectArrayElement(env, arr, pos);
}
void setObjArr(JNIEnv* env, jobjectArray s, jint pos, jobject obj){
return (*env)->SetObjectArrayElement(env, s, pos, obj);
}
jlong atol64(const char s[]){
int x = 0;
jlong b = 0;
for(;s[x] != '\0'; x++)
b = (b +( s[x] - '0')) * 10;
return b/10;
}
void mencobaRef(JNIEnv* env){
jint a = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 0));
jint b = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 1));
__android_log_print(ANDROID_LOG_INFO, "check", "Array value %d %d", a, b);
}
void ReaderLog(JNIEnv* env, FILE* read, char temp[], jint chr, jobjectArray arr, jint* pindex, jint* hasNull, jint* offset, jint* deleteAfterCall){
jint d = 0;
jint index = *pindex;
index+=2;
getc(read);
(*env)->SetObjectArrayElement(env, arr, d++, jintToObject(env, chr));
//getting TAG and packageName values
jint x = 0;
while((chr = getc(read)) != pemisah)
temp[x++] = dstr(chr);
temp[x++] = ' ';
while((chr = getc(read)) != pemisah)
temp[x++] = dstr(chr);
temp[x] = '\0';
__android_log_print(ANDROID_LOG_INFO, "Check", "value of tag %s", temp);
index+=x;index++;
x = 0;
(*env)->SetObjectArrayElement(env, arr, d++, (*env)->NewStringUTF(env, temp));
//Getting date
while((chr = getc(read))!= pemisah)temp[x++] = dnum(chr);
temp[x] = '\0';
index+=x;index++;
struct date myDate;
todate(atol64(temp), &myDate);
sprintf(temp, "%d/%d/%d", myDate.day, myDate.month, myDate.years);
(*env)->SetObjectArrayElement(env, arr, d++, (*env)->NewStringUTF(env, temp));
x = 0;
//Getting Time
while((chr = getc(read))!= pemisah) temp[x++] = dnum(chr);
temp[x] = '\0';
index+=x;index++;
struct tp myTime;
totime(atol64(temp), &myTime);
sprintf(temp, "%d:%d:%d.%d\0", myTime.hours, myTime.min, myTime.sec, myTime.millis);
(*env)->SetObjectArrayElement(env, arr, d++, (*env)->NewStringUTF(env, temp));
x = 0;
//Getting content
while((chr = getc(read))!=last)temp[x++] = dstr(chr);
temp[x] = '\0';
index+=x;index+=2;
(*env)->SetObjectArrayElement(env, arr, d++, (*env)->NewStringUTF(env, temp));
x = 0;
if((chr = getc(read)) == '\0')
*hasNull = 1;
*offset += index;
//saving value to reference
if(*deleteAfterCall){
if(integerReference!=NULL)
(*env)->DeleteGlobalRef(env, integerReference);
integerReference = NULL;
}
else {
if(integerReference == NULL){
jobjectArray tt = (*env)->NewObjectArray(env, 2, (*env)->FindClass(env, "java/lang/Object"), NULL);
(*env)->SetObjectArrayElement(env, tt, 0, jintToObject(env, *offset));//Offset file
(*env)->SetObjectArrayElement(env, tt, 1, jintToObject(env, *hasNull));//hasNull
integerReference = (*env)->NewGlobalRef(env, tt);
}
else{
(*env)->SetObjectArrayElement(env, integerReference, 0, jintToObject(env, *offset));//Offset file
(*env)->SetObjectArrayElement(env, integerReference, 1, jintToObject(env, *hasNull));//hasNull
}
mencobaRef(env);
}
*pindex = index;
}
JNIEXPORT void JNICALL Java_com_mylexz_utils_Logger_toNonNull(JNIEnv* env, jobject obj){
if(integerReference!=NULL)
(*env)->SetObjectArrayElement(env, integerReference, 1, jintToObject(env, 0));
}
JNIEXPORT jint JNICALL Java_com_mylexz_utils_Logger_hasNull(JNIEnv* env, jobject obj){
if(integerReference!=NULL){
jint a = toInt(env, getObjFromArr(env, integerReference, 1));
return a;
}
return 0;
}
JNIEXPORT void JNICALL Java_com_mylexz_utils_Logger_reset(JNIEnv* env, jobject obj)
{
if(integerReference!=NULL)
(*env)->DeleteGlobalRef(env, integerReference);
integerReference = NULL;
}
JNIEXPORT jobjectArray JNICALL Java_com_mylexz_utils_Logger_readLogAtPrio(JNIEnv* env, jobject thz, jstring file, jint prio, jint deleteAfterCall){
char *filepath = (*env)->GetStringUTFChars(env, file, 0);
if (checkExists(filepath) == 1)
return NULL;
char temp[2048]; //allocating 2kB memories for ram
//opening file
FILE* read = fopen(filepath, "r");
//check signature
jint index = 0;
jint maxIdx= GID;
jint offset, hasNull;
while(index < maxIdx)
temp[index++] = dstr(getc(read));
temp[index] = '\0';
index = 0;
if(!cmp(temp, sig))
return NULL;
if(integerReference == NULL){
offset = 31;
hasNull = 0;
}
else {
jint a = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 0));
jint b = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 1));
offset = a;
hasNull = b;
}
// if(hasNull)
// return NULL; //index reaching null character
fseek(read, offset, 0);
jobjectArray arr =
(*env)->NewObjectArray(env, 5, (*env)->FindClass(env, "java/lang/Object"), NULL);
jint chr, d = 0;
while(1){
if((chr = getc(read)) == -1)
break;
if(chr == prio){
ReaderLog(env, read, temp, chr, arr, &index, &hasNull, &offset, &deleteAfterCall);
return arr;
}
index++;
}/* LOOP END */
__android_log_print(ANDROID_LOG_INFO, "CHECK", "NULL IS REACHED");
offset+=index;
if(deleteAfterCall){
if(integerReference!=NULL)
(*env)->DeleteGlobalRef(env, integerReference);
integerReference = NULL;
}
else {
if(integerReference == NULL){
jobjectArray tt = (*env)->NewObjectArray(env, 2, (*env)->FindClass(env, "java/lang/Object"), NULL);
setObjArr(env, tt, 0, jintToObject(env, offset));//Offset file
setObjArr(env, tt, 1, jintToObject(env, 1));//hasNull
integerReference = (*env)->NewGlobalRef(env, tt);
}
else {
setObjArr(env, integerReference, 0, jintToObject(env, offset));//Offset file
setObjArr(env, integerReference, 1, jintToObject(env, 1));//hasNull
}
mencobaRef(env);
}
fclose(read);
return NULL;
}
JNIEXPORT jobjectArray JNICALL Java_com_mylexz_utils_Logger_readL(JNIEnv* env, jobject thz, jstring file, jint deleteAfterCall){
char *filepath = (*env)->GetStringUTFChars(env, file, 0);
if (checkExists(filepath)==1)
return NULL;
char temp[2048]; //allocating 2kB memories for ram
//opening file
FILE* read = fopen(filepath, "r");
//check signature
jint index = 0;
jint maxIdx= GID;
jint offset, hasNull;
while(index < maxIdx)
temp[index++] = dstr(getc(read));
temp[index] = '\0';
index = 0;
if(!cmp(temp, sig))
return NULL;
if(integerReference == NULL){
offset = 31;
hasNull = 0;
}
else {
jint a = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 0));
jint b = toInt(env, (*env)->GetObjectArrayElement(env, integerReference, 1));
offset = a;
hasNull = b;
}
// if(hasNull)
// return NULL; //index reaching null character
fseek(read, offset, 0);
jobjectArray arr =
(*env)->NewObjectArray(env, 5, (*env)->FindClass(env, "java/lang/Object"), NULL);
jint chr, d = 0;
//while((chr = getc(read))!= -1){
if((chr = getc(read)) == -1 ){
hasNull = 1;
if(deleteAfterCall){
if(integerReference!=NULL)
(*env)->DeleteGlobalRef(env, integerReference);
integerReference = NULL;
}
else {
if(integerReference == NULL){
jobjectArray tt = (*env)->NewObjectArray(env, 2, (*env)->FindClass(env, "java/lang/Object"), NULL);
(*env)->SetObjectArrayElement(env, tt, 0, jintToObject(env, offset));//Offset file
(*env)->SetObjectArrayElement(env, tt, 1, jintToObject(env, hasNull));//hasNull
integerReference = (*env)->NewGlobalRef(env, tt);
}
else{
(*env)->SetObjectArrayElement(env, integerReference, 0, jintToObject(env, offset));//Offset file
(*env)->SetObjectArrayElement(env, integerReference, 1, jintToObject(env, hasNull));//hasNull
}
mencobaRef(env);
}
return NULL;
}
ReaderLog(env, read, temp, chr, arr, &index, &hasNull, &offset, &deleteAfterCall);
fclose(read);
return arr;
}
jint size(const char s[]){
jint x = 0;
while(s[x++]!='\0');
return x-1;
}
JNIEXPORT void JNICALL Java_com_mylexz_utils_Logger_writeLog(JNIEnv *env, jobject thz,
jstring file, jint prio, jlong millis, jlong date,
jstring packageName, jstring nameId, jstring content)
{
/******* Convert jlong millis and date to string ******/
char strMs[16], strDt[16];
sprintf(strMs, "%lld", millis);
sprintf(strDt, "%lld", date);
/******* Convert all string to C-style string ******/
char *files = (*env)->GetStringUTFChars(env, file, 0);
char *pack = (*env)->GetStringUTFChars(env, packageName, 0);
char *TAG = (*env)->GetStringUTFChars(env, nameId, 0);
char *contentd = (*env)->GetStringUTFChars(env, content, 0);
/*********** Get all size string *************/
jsize lpack = (*env)->GetStringUTFLength(env, packageName);
jsize lTAG = (*env)->GetStringUTFLength(env, nameId);
jsize lcontentd = (*env)->GetStringUTFLength(env, content);
jsize lstrMs = size(strMs);
jsize lstrDt = size(strDt);
/*********** Allocate memory for new string ********/
char tmp[(lpack+lTAG+lcontentd+lstrMs+lstrDt+7)];
/*********** Querying *************/
jint x = 0;
tmp[x++] = prio;
tmp[x++] = pemisah;
//TAG
jint y = 0;
__android_log_print(ANDROID_LOG_INFO, "CheckBeforeSave", "value of tag %s, packageName %s", TAG, pack);
while(y < lTAG)
tmp[x++] = estr(TAG[y++]);
tmp[x++] = pemisah;
//package
y = 0;
while(y < lpack)
tmp[x++] = estr(pack[y++]);
tmp[x++] = pemisah;
//date
y = 0;
while(y < lstrDt)
tmp[x++] = enm(strDt[y++]);
tmp[x++] = pemisah;
//time
y = 0;
while(y < lstrMs)
tmp[x++] = enm(strMs[y++]);
tmp[x++] = pemisah;
//content
y = 0;
while(y < lcontentd)
tmp[x++] = estr(contentd[y++]);
tmp[x++] = last;
tmp[x++] = '\n';
tmp[x] = '\0';
//Release Strings
(*env)->ReleaseStringUTFChars(env, packageName, pack);
(*env)->ReleaseStringUTFChars(env, nameId, TAG);
(*env)->ReleaseStringUTFChars(env, content, contentd);
/*** Opening file****/
if(checkExists(files) == 0){
FILE *f;
f = fopen(files, "a+");
fprintf(f, "%s", tmp);
fclose(f);
}
else {
FILE *f;
f = fopen(files, "a+");
char *n = "MyLogger";
char *z = "@ Lcom/mylexz \n";
char w[8];
int y = 0;
for (;n[y] != '\0'; y++)
w[y] =estr( n[y]);
w[y] = '\0';
fprintf(f, "%s , ^^^ %s\n%s", w, z, tmp);
fclose(f);
}
//Release
(*env)->ReleaseStringUTFChars(env, file, files);
}
| 28.938462 | 147 | 0.637579 |
d8a852182020ea59474ac77d84a67ab4b6400df9 | 106 | h | C | cpp-sample/MemoryControll/declaration.h | techstay/cpp-study | b55369a4038b2683ca2191c0ab8115830c94a257 | [
"MIT"
] | null | null | null | cpp-sample/MemoryControll/declaration.h | techstay/cpp-study | b55369a4038b2683ca2191c0ab8115830c94a257 | [
"MIT"
] | null | null | null | cpp-sample/MemoryControll/declaration.h | techstay/cpp-study | b55369a4038b2683ca2191c0ab8115830c94a257 | [
"MIT"
] | null | null | null | #pragma once
#include "stdafx.h"
void smart_pointers();
void manual_memory_controll();
void allocators(); | 17.666667 | 30 | 0.773585 |
d8abc0191672b14c4797bc186def27ee83b103ff | 1,667 | c | C | demosockcmd-server.c | NoNine/sockcmd | c696e1c69f9caf5ef03f7735915f66c5e0e28869 | [
"Apache-2.0"
] | null | null | null | demosockcmd-server.c | NoNine/sockcmd | c696e1c69f9caf5ef03f7735915f66c5e0e28869 | [
"Apache-2.0"
] | null | null | null | demosockcmd-server.c | NoNine/sockcmd | c696e1c69f9caf5ef03f7735915f66c5e0e28869 | [
"Apache-2.0"
] | 1 | 2020-02-21T03:57:33.000Z | 2020-02-21T03:57:33.000Z | /*
* Copyright (C) 2016 Min Chen <chen.min@whaley.cn>
*
* 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.
*/
#define LOG_NDEBUG 0
#define LOG_TAG "demosockcmd-server"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <cutils/log.h>
#include <sockcmd/sockcmd.h>
SOCKCMD_METHOD(demosockcmd_ping, "Ping", 0);
SOCKCMD_METHOD(demosockcmd_add, "Add", 2);
sockcmd_t hsockcmd;
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
sockcmd_server_init(&hsockcmd, "demosockcmd");
sockcmd_server_add_method(hsockcmd, &demosockcmd_ping);
sockcmd_server_add_method(hsockcmd, &demosockcmd_add);
sockcmd_server_loop(hsockcmd);
sockcmd_server_term(hsockcmd);
return 0;
}
static int do_demosockcmd_ping(char **arg, char *reply)
{
(void)arg;
(void)reply;
return 0;
}
static int do_demosockcmd_add(char **arg, char *reply)
{
int a;
int b;
a = atoi(arg[0]);
b = atoi(arg[1]);
/*
* The result can be returned by relpy,
* but it's a bit complex to parse the string.
*/
/* snprintf(reply, REPLY_MAX, "%d", a + b); */
return a + b;
}
| 22.527027 | 75 | 0.685663 |
d8ac1cae0eb915794a670690f57e92e8bcc6dc4d | 4,581 | h | C | L1Trigger/TrackFindingTracklet/interface/TrackDer.h | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/TrackFindingTracklet/interface/TrackDer.h | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/TrackFindingTracklet/interface/TrackDer.h | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | //
// This class holdes the 'deriviatives' used in the linearized chi^2 fit.
// This is also referred to as the weight matrix which is used to weight
// the residuls when calculating the updated track parameters.
//
//
#ifndef L1Trigger_TrackFindingTracklet_interface_TrackDer_h
#define L1Trigger_TrackFindingTracklet_interface_TrackDer_h
#include <iostream>
#include <fstream>
#include <cassert>
#include <cmath>
#include <vector>
#include "L1Trigger/TrackFindingTracklet/interface/Settings.h"
namespace trklet {
class TrackDer {
public:
TrackDer();
~TrackDer() = default;
void setIndex(int layermask, int diskmask, int alphamask, int irinv);
int layerMask() const { return layermask_; }
int diskMask() const { return diskmask_; }
int alphaMask() const { return alphamask_; }
int irinv() const { return irinv_; }
void setirinvdphi(int i, int irinvdphi) { irinvdphi_[i] = irinvdphi; }
void setirinvdzordr(int i, int irinvdzordr) { irinvdzordr_[i] = irinvdzordr; }
void setiphi0dphi(int i, int iphi0dphi) { iphi0dphi_[i] = iphi0dphi; }
void setiphi0dzordr(int i, int iphi0dzordr) { iphi0dzordr_[i] = iphi0dzordr; }
void setitdphi(int i, int itdphi) { itdphi_[i] = itdphi; }
void setitdzordr(int i, int itdzordr) { itdzordr_[i] = itdzordr; }
void setiz0dphi(int i, int iz0dphi) { iz0dphi_[i] = iz0dphi; }
void setiz0dzordr(int i, int iz0dzordr) { iz0dzordr_[i] = iz0dzordr; }
void setitdzcorr(int i, int j, int itdzcorr) { itdzcorr_[i][j] = itdzcorr; }
void setiz0dzcorr(int i, int j, int iz0dzcorr) { iz0dzcorr_[i][j] = iz0dzcorr; }
void setrinvdphi(int i, double rinvdphi) { rinvdphi_[i] = rinvdphi; }
void setrinvdzordr(int i, double rinvdzordr) { rinvdzordr_[i] = rinvdzordr; }
void setphi0dphi(int i, double phi0dphi) { phi0dphi_[i] = phi0dphi; }
void setphi0dzordr(int i, double phi0dzordr) { phi0dzordr_[i] = phi0dzordr; }
void settdphi(int i, double tdphi) { tdphi_[i] = tdphi; }
void settdzordr(int i, double tdzordr) { tdzordr_[i] = tdzordr; }
void setz0dphi(int i, double z0dphi) { z0dphi_[i] = z0dphi; }
void setz0dzordr(int i, double z0dzordr) { z0dzordr_[i] = z0dzordr; }
void settdzcorr(int i, int j, double tdzcorr) { tdzcorr_[i][j] = tdzcorr; }
void setz0dzcorr(int i, int j, double z0dzcorr) { z0dzcorr_[i][j] = z0dzcorr; }
double rinvdphi(int i) const { return rinvdphi_[i]; }
double rinvdzordr(int i) const { return rinvdzordr_[i]; }
double phi0dphi(int i) const { return phi0dphi_[i]; }
double phi0dzordr(int i) const { return phi0dzordr_[i]; }
double tdphi(int i) const { return tdphi_[i]; }
double tdzordr(int i) const { return tdzordr_[i]; }
double z0dphi(int i) const { return z0dphi_[i]; }
double z0dzordr(int i) const { return z0dzordr_[i]; }
double tdzcorr(int i, int j) const { return tdzcorr_[i][j]; }
double z0dzcorr(int i, int j) const { return z0dzcorr_[i][j]; }
double irinvdphi(int i) const { return irinvdphi_[i]; }
double irinvdzordr(int i) const { return irinvdzordr_[i]; }
double iphi0dphi(int i) const { return iphi0dphi_[i]; }
double iphi0dzordr(int i) const { return iphi0dzordr_[i]; }
double itdphi(int i) const { return itdphi_[i]; }
double itdzordr(int i) const { return itdzordr_[i]; }
double iz0dphi(int i) const { return iz0dphi_[i]; }
double iz0dzordr(int i) const { return iz0dzordr_[i]; }
int itdzcorr(int i, int j) const { return itdzcorr_[i][j]; }
int iz0dzcorr(int i, int j) const { return iz0dzcorr_[i][j]; }
void settpar(double t) { t_ = t; }
double tpar() const { return t_; }
void fill(int t, double MinvDt[N_FITPARAM][N_FITSTUB * 2], int iMinvDt[N_FITPARAM][N_FITSTUB * 2]) const;
private:
int irinvdphi_[N_FITSTUB];
int irinvdzordr_[N_FITSTUB];
int iphi0dphi_[N_FITSTUB];
int iphi0dzordr_[N_FITSTUB];
int itdphi_[N_FITSTUB];
int itdzordr_[N_FITSTUB];
int iz0dphi_[N_FITSTUB];
int iz0dzordr_[N_FITSTUB];
int itdzcorr_[N_PSLAYER][N_PSLAYER];
int iz0dzcorr_[N_PSLAYER][N_PSLAYER];
double rinvdphi_[N_FITSTUB];
double rinvdzordr_[N_FITSTUB];
double phi0dphi_[N_FITSTUB];
double phi0dzordr_[N_FITSTUB];
double tdphi_[N_FITSTUB];
double tdzordr_[N_FITSTUB];
double z0dphi_[N_FITSTUB];
double z0dzordr_[N_FITSTUB];
double tdzcorr_[N_PSLAYER][N_PSLAYER];
double z0dzcorr_[N_PSLAYER][N_PSLAYER];
double t_;
int layermask_;
int diskmask_;
int alphamask_;
int irinv_;
};
}; // namespace trklet
#endif
| 37.859504 | 109 | 0.688933 |
d8b656ba67484f4ba647bba12aee2add6beb9bc9 | 1,055 | h | C | vcf/VCFBuilder2/RemoveComponentCmd.h | tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective | 1b0172cdb78757fd17898503aaf6ce03d940ef28 | [
"Apache-1.1"
] | 46 | 2015-12-04T17:12:58.000Z | 2022-03-11T04:30:49.000Z | vcf/VCFBuilder2/RemoveComponentCmd.h | tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective | 1b0172cdb78757fd17898503aaf6ce03d940ef28 | [
"Apache-1.1"
] | null | null | null | vcf/VCFBuilder2/RemoveComponentCmd.h | tharindusathis/sourcecodes-of-CodeReadingTheOpenSourcePerspective | 1b0172cdb78757fd17898503aaf6ce03d940ef28 | [
"Apache-1.1"
] | 23 | 2016-10-24T09:18:14.000Z | 2022-02-25T02:11:35.000Z | //RemoveComponentCmd.h
#ifndef _REMOVECOMPONENTCMD_H__
#define _REMOVECOMPONENTCMD_H__
#include "AbstractCommand.h"
using namespace VCF;
namespace VCFBuilder {
class Project;
class Form;
/**
*Class RemoveComponentCmd documentation
*/
class RemoveComponentCmd : public VCF::AbstractCommand {
public:
RemoveComponentCmd( const String& componentName, Project* project, Form* activeFormInst );
virtual ~RemoveComponentCmd();
virtual void undo();
virtual void redo();
virtual void execute();
protected:
Class* m_componentClass;
Component* m_component;
Project* m_project;
String m_componentName;
String m_componentVFFString;
String m_componentParentName;
Form* m_activeFormInst;
Container* findParentControl( Container* container );
Component* findComponent();
Component* findTheComponent( const String& componentName, Container* container, Control* containerControl );
std::map<EventProperty*,String> m_connectedEvents;
private:
};
}; //end of namespace VCFBuilder
#endif //_REMOVECOMPONENTCMD_H__
| 18.508772 | 110 | 0.767773 |
d8b78884599ae29d6943aad619937280cf93ba9a | 847 | c | C | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t258.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t258.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t258.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | /*
* (c) HPC Project - 2010-2011 - All rights reserved
*
*/
#include "scilab_rt.h"
int __lv0;
int __lv1;
int __lv2;
int __lv3;
/*----------------------------------------------------*/
/*----------------------------------------------------*/
int main(int argc, char* argv[])
{
scilab_rt_init(argc, argv, COLD_MODE_STANDALONE);
/* t258.sce: ones, zeros, rand with 3D matrices */
double _u_a[3][3][3];
scilab_rt_ones_i0i0i0_d3(3,3,3,3,3,3,_u_a);
double _u_t1[3][3][3];
scilab_rt_ones_d3_d3(3,3,3,_u_a,3,3,3,_u_t1);
scilab_rt_display_s0d3_("t1",3,3,3,_u_t1);
double _u_t2[3][3][3];
scilab_rt_zeros_d3_d3(3,3,3,_u_a,3,3,3,_u_t2);
scilab_rt_display_s0d3_("t2",3,3,3,_u_t2);
double _u_t3[3][3][3];
scilab_rt_rand_d3_d3(3,3,3,_u_a,3,3,3,_u_t3);
scilab_rt_display_s0d3_("t3",3,3,3,_u_t3);
scilab_rt_terminate();
}
| 21.717949 | 56 | 0.585596 |
d8bfbb932a72d191ce2aee150543ce795e3208c4 | 5,373 | h | C | filters/fdacoefs_2.h | Dnnd/equalizer_cw | 369cc67436afadd08b446520af7c8fdc52662901 | [
"MIT"
] | 2 | 2019-02-12T12:45:25.000Z | 2020-07-08T13:01:54.000Z | filters/fdacoefs_2.h | Dnnd/equalizer_cw | 369cc67436afadd08b446520af7c8fdc52662901 | [
"MIT"
] | null | null | null | filters/fdacoefs_2.h | Dnnd/equalizer_cw | 369cc67436afadd08b446520af7c8fdc52662901 | [
"MIT"
] | null | null | null | /*
* Filter Coefficients (C Source) generated by the Filter Design and Analysis Tool
* Generated by MATLAB(R) 9.4 and Signal Processing Toolbox 8.0.
* Generated on: 18-Jun-2018 00:37:49
*/
/*
* Discrete-Time IIR Filter (real)
* -------------------------------
* Filter Structure : Direct-Form II, Second-Order Sections
* Number of Sections : 15
* Stable : Yes
* Linear Phase : No
*/
/* General type conversion for MATLAB generated C-code */
#include "tmwtypes.h"
/*
* Expected path to tmwtypes.h
* E:\Soft\Matlab2018a\extern\include\tmwtypes.h
*/
#define MWSPT_NSEC 31
const int NL[MWSPT_NSEC] = { 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 };
const real64_T NUM[MWSPT_NSEC][3] = {
{
0.8828314074444, 0, 0
},
{
1, -1.999797505046, 1
},
{
0.8828314074444, 0, 0
},
{
1, -1.999498437943, 1
},
{
0.8735419621824, 0, 0
},
{
1, -1.999801585223, 1
},
{
0.8735419621824, 0, 0
},
{
1, -1.999488124674, 1
},
{
0.8526348975996, 0, 0
},
{
1, -1.999810420569, 1
},
{
0.8526348975996, 0, 0
},
{
1, -1.999464270749, 1
},
{
0.8134346806537, 0, 0
},
{
1, -1.999825614664, 1
},
{
0.8134346806537, 0, 0
},
{
1, -1.999417597549, 1
},
{
0.7414422504786, 0, 0
},
{
1, -1.999850333053, 1
},
{
0.7414422504786, 0, 0
},
{
1, -1.999321422434, 1
},
{
0.6071070862268, 0, 0
},
{
1, -1.999890366546, 1
},
{
0.6071070862268, 0, 0
},
{
1, -1.999073682771, 1
},
{
0.3636762081867, 0, 0
},
{
1, -1.99995198041, 1
},
{
0.3636762081867, 0, 0
},
{
1, -1.997885722175, 1
},
{
0.007621888080756, 0, 0
},
{
1, 0, -1
},
{
1, 0, 0
}
};
const int DL[MWSPT_NSEC] = { 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1 };
const real64_T DEN[MWSPT_NSEC][3] = {
{
1, 0, 0
},
{
1, -1.999100691876, 0.9995763681351
},
{
1, 0, 0
},
{
1, -1.999502768312, 0.9997162081034
},
{
1, 0, 0
},
{
1, -1.99817329059, 0.9986534745581
},
{
1, 0, 0
},
{
1, -1.998895425439, 0.9991066994293
},
{
1, 0, 0
},
{
1, -1.996986833024, 0.9974762361633
},
{
1, 0, 0
},
{
1, -1.99815076513, 0.9983578592509
},
{
1, 0, 0
},
{
1, -1.995275346417, 0.9957779913576
},
{
1, 0, 0
},
{
1, -1.997125245287, 0.9973266078625
},
{
1, 0, 0
},
{
1, -1.992629045754, 0.9931447681826
},
{
1, 0, 0
},
{
1, -1.995576753471, 0.9957725981267
},
{
1, 0, 0
},
{
1, -1.988656207657, 0.9891683977663
},
{
1, 0, 0
},
{
1, -1.993086267869, 0.9932828243158
},
{
1, 0, 0
},
{
1, -1.98437819009, 0.9848284864105
},
{
1, 0, 0
},
{
1, -1.989096933246, 0.9893195772015
},
{
1, 0, 0
},
{
1, -1.984439959489, 0.9847562238385
},
{
1, 0, 0
}
};
| 24.990698 | 94 | 0.273218 |
d8c0e9ac2b1f55640a08202275ead7a521dc4151 | 7,578 | h | C | cpp/problems/graph.h | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 1 | 2020-06-26T13:28:43.000Z | 2020-06-26T13:28:43.000Z | cpp/problems/graph.h | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 7 | 2021-11-18T19:46:08.000Z | 2022-03-12T01:03:01.000Z | cpp/problems/graph.h | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | null | null | null | #pragma once
#include <memory>
#include <numeric>
#include <vector>
#include <unordered_map>
#include <stack>
#include <queue>
namespace problems::graph
{
/* Route Between Nodes:
*
* Given a directed graph, design an algorithm to find out whether there is
* a route between nodes.
*/
struct has_route
{
class node;
using node_list = std::vector<const node*>;
using node_ptr = node*;
class node
{
char name_;
node_list children_{ };
public:
node() = delete;
explicit node( const char name )
: name_{ name }
{ }
void add_edge( const node* other )
{
children_.push_back( other );
}
[[nodiscard]] const char& name() const { return name_; }
[[nodiscard]] const node_list& children() const
{
return children_;
}
};
struct edge
{
char from{}, to{};
edge( const char& first, const char& second )
{
from = first;
to = second;
}
};
class graph
{
std::unordered_map<char, std::unique_ptr<node>> vertices_{ };
public:
graph() = delete;
graph( const std::initializer_list<char>& vertices )
{
for( const auto& vertex : vertices )
vertices_[ vertex ] = std::make_unique<node>( vertex );
}
void connect( const std::vector<edge>& edge_list )
{
for( const auto& edge : edge_list )
vertices_[ edge.from ]->add_edge( vertices_[ edge.to ].get() );
}
const node& operator[]( const char vertex ) const
{
return *vertices_.at( vertex );
}
};
/// <summary>
/// has_route1
///
/// This is a simple depth-first search of the graph that
/// starts at the first node and traverses the graph (deep-wise)
/// until it finds the second node, or traversed all nodes without
/// finding it.
/// </summary>
/// <param name="graph">graph to search</param>
/// <param name="first">node 1</param>
/// <param name="second">node 2</param>
/// <complexity>
/// <run-time>O(M + N)</run-time>
/// <space>O(1)</space>
/// </complexity>
/// <returns>true iff there is a path from 1 -> 2</returns>
static bool has_route1( const graph& graph,
const char& first,
const char& second )
{
if( first == second ) return true;
auto seen = std::stack<const node*>{ };
seen.push( &graph[ first ] );
while( !seen.empty() )
{
const auto current = seen.top();
seen.pop();
for( const auto& node : current->children() )
{
if( node->name() == second )
return true;
seen.push( node );
}
}
return false;
}
/// <summary>
/// has_route2
///
/// This is a simple breadth-first search of the graph that
/// starts at the first node and traverses the graph (breath-wise)
/// until it finds the second node, or traversed all nodes without
/// finding it.
/// </summary>
/// <param name="graph">graph to search</param>
/// <param name="first">node 1</param>
/// <param name="second">node 2</param>
/// <complexity>
/// <run-time>O(M + N)</run-time>
/// <space>O(1)</space>
/// </complexity>
/// <returns>true iff there is a path from 1 -> 2</returns>
static bool has_route2( const graph& graph,
const char& first,
const char& second )
{
if( first == second ) return true;
auto seen = std::queue<const node*>{ };
seen.emplace( &graph[ first ] );
while( !seen.empty() )
{
const auto current = seen.front();
seen.pop();
for( const auto& node : current->children() )
{
if( node->name() == second )
return true;
seen.emplace( node );
}
}
return false;
}
};
/* Build Order.
*
* You are given a list of projects and a list of dependencies (which is a
* list of pairs of projects, where the second project is dependent on the first
*
* project). All of a project's dependencies must be built before the project is.
* Find a build order that will allow the projects to be built. If there is no
* valid build order, return an error.
*
* EXAMPLE:
*
* Input:
* projects: a, b, c, d, e, f
* dependencies: (a, d), (f, b), (b, d), (f, a), (d, c)
* Output: f, e, a, b, d, c
*/
class build_order
{
using node_list = std::vector<char>;
using build_list = std::unordered_map<char, std::unique_ptr<node_list>>;
inline static const std::string cycle_err =
"CYCLICAL PROJECT REFERENCE DETECTED. CANNOT CONTINUE BUILD.";
std::unique_ptr<build_list> projects_;
static std::vector<char> dfs( const build_list& projects,
const char node, std::set<char>& seen )
{
auto path = std::vector<char>();
auto stack = std::stack<char>( { node } );
auto loop_detect = std::set<char>();
while( !stack.empty() )
{
const auto v = stack.top();
stack.pop();
loop_detect.insert( v );
for( const auto u : *projects.at( v ) )
{
if( loop_detect.find( u ) != loop_detect.end() )
throw std::runtime_error( cycle_err );
if( seen.find( u ) == seen.end() )
stack.push( u );
}
path.insert( path.begin(), v );
seen.insert( v );
}
return path;
}
bool topological_sort( std::vector<std::pair<int, char>>& order, std::string& value ) const
{
std::set<char> seen;
auto label = projects_->size();
for( [[maybe_unused]] const auto& [key, v_not_used] : *projects_ )
{
if( seen.find( key ) != seen.end() )
continue;
try
{
auto path = dfs( *projects_, key, seen );
for( const auto& node : path )
order.emplace_back( --label, node );
}
catch( std::runtime_error& e )
{
value = e.what();
return false;
}
}
std::sort( order.begin(), order.end(),
[]( auto& left, auto& right ) {
return left.first < right.first;
} );
return true;
}
public:
build_order()
{
projects_ = std::make_unique<build_list>();
}
build_order( const std::initializer_list<char>& projects,
const std::initializer_list<std::pair<char, char>>& dependencies )
: build_order()
{
for( const auto& project : projects )
add_project( project );
for( const auto& dependency : dependencies )
add_dependency( dependency.first, dependency.second );
}
void add_project( const char project ) const
{
projects_->insert( std::make_pair( project, std::make_unique<node_list>() ) );
}
void add_dependency( const char project, const char dependency ) const
{
projects_->at( project )->push_back( dependency );
}
/// <summary>
/// build order
///
/// This approach uses a topological sort to generate the build
/// order of the project list. We use a dfs approach to traverse all nodes
/// in the graph, and label them in descending order. During the dfs, if we
/// see a node twice in the same dfs call we throw an error as we have
/// encountered a cyclic reference in the project definition. Global seen
/// list ensure we only traverse each node once giving us a runtime of O(N + M).
/// </summary>
/// <complexity>
/// <run-time>O(M + N)</run-time>
/// <space>O(N)</space>
/// </complexity>
/// <returns></returns>
[[nodiscard]] std::string get_build_order() const
{
std::vector<std::pair<int, char>> order;
std::string value;
if( !topological_sort( order, value ) ) return value;
if( order.begin() == order.end() )
return std::string();
auto result = std::accumulate( order.begin(), order.end() - 1, std::string{},
[]( std::string& r, auto& project )
{
return std::move( r ) + project.second + ", ";
} );
result += order.back().second;
return result;
}
};
} | 22.756757 | 93 | 0.605437 |
d8c143b10a68924ee60ee1e445019619116c4de3 | 328 | h | C | content/examples/calculator/src/version-template.h | v1j4y/cmake-workshop | 1afc884718d62e70f57c824fdd6f560002a9e6b3 | [
"CC-BY-4.0"
] | 3 | 2021-11-07T09:36:09.000Z | 2021-11-19T10:37:32.000Z | content/examples/calculator/src/version-template.h | v1j4y/cmake-workshop | 1afc884718d62e70f57c824fdd6f560002a9e6b3 | [
"CC-BY-4.0"
] | 2 | 2021-11-08T15:54:02.000Z | 2021-11-08T15:54:50.000Z | content/examples/calculator/src/version-template.h | coderefinery/cmake-workshop | 27b5ac9e2ff0a76930994b9a34310a169aed5010 | [
"CC-BY-4.0"
] | 3 | 2021-11-08T13:36:53.000Z | 2022-02-04T21:22:46.000Z | // CMake will replace all keys between @...@ by the value
// these exist as CMake variables
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define VERSION_PATCH @PROJECT_VERSION_PATCH@
// this is not a CMake variable, we need to set it ourselves
#define GIT_HASH "@GIT_HASH@"
| 32.8 | 60 | 0.771341 |
d8c294359c970483890d32f0fc3e891f12b1439d | 22,933 | c | C | src/export/init.c | QuLogic/rlang | f0c9be5c5806b4e4b120b7516f286fef3c66bda5 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | src/export/init.c | QuLogic/rlang | f0c9be5c5806b4e4b120b7516f286fef3c66bda5 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | src/export/init.c | QuLogic/rlang | f0c9be5c5806b4e4b120b7516f286fef3c66bda5 | [
"BSD-2-Clause",
"MIT"
] | 1 | 2019-07-11T04:42:02.000Z | 2019-07-11T04:42:02.000Z | #include <Rinternals.h>
#include <R_ext/Rdynload.h>
// Compile with `-fvisibility=hidden -DHAVE_VISIBILITY_ATTRIBUTE` if you link to this library
#include <R_ext/Visibility.h>
#define export attribute_visible extern
#include <rlang.h>
// Callable from other packages
extern sexp* r_squash_if(sexp*, enum r_type, bool (*is_spliceable)(sexp*), int);
extern bool rlang_is_clevel_spliceable(sexp*);
extern bool rlang_is_quosure(sexp*);
// Callable from this package
extern sexp* r_f_lhs(sexp*);
extern sexp* r_f_rhs(sexp*);
extern sexp* r_new_condition(sexp*, sexp*, sexp*);
extern sexp* r_env_clone(sexp*, sexp*);
extern sexp* rlang_env_unbind(sexp*, sexp*, sexp*);
extern sexp* rlang_env_poke_parent(sexp*, sexp*);
extern sexp* rlang_env_frame(sexp* env);
extern sexp* rlang_env_hash_table(sexp* env);
extern sexp* rlang_poke_type(sexp*, sexp*);
extern sexp* rlang_replace_na(sexp*, sexp*);
extern sexp* rlang_node_car(sexp*);
extern sexp* rlang_node_cdr(sexp*);
extern sexp* rlang_node_caar(sexp*);
extern sexp* rlang_node_cadr(sexp*);
extern sexp* rlang_node_cdar(sexp*);
extern sexp* rlang_node_cddr(sexp*);
extern sexp* rlang_missing_arg();
extern sexp* rlang_node_poke_car(sexp*, sexp*);
extern sexp* rlang_node_poke_cdr(sexp*, sexp*);
extern sexp* rlang_node_poke_caar(sexp*, sexp*);
extern sexp* rlang_node_poke_cadr(sexp*, sexp*);
extern sexp* rlang_node_poke_cdar(sexp*, sexp*);
extern sexp* rlang_node_poke_cddr(sexp*, sexp*);
extern sexp* rlang_duplicate(sexp*, sexp*);
extern sexp* r_node_tree_clone(sexp*);
extern sexp* rlang_node_tag(sexp*);
extern sexp* rlang_node_poke_tag(sexp*, sexp*);
extern sexp* rlang_interp(sexp*, sexp*);
extern sexp* rlang_is_function(sexp*);
extern sexp* rlang_is_closure(sexp*);
extern sexp* rlang_is_primitive(sexp*);
extern sexp* rlang_is_primitive_eager(sexp*);
extern sexp* rlang_is_primitive_lazy(sexp*);
extern sexp* rlang_is_formula(sexp*, sexp*, sexp*);
extern sexp* rlang_is_formulaish(sexp*, sexp*, sexp*);
extern sexp* rlang_is_reference(sexp*, sexp*);
extern sexp* rlang_sexp_address(sexp*);
extern sexp* rlang_length(sexp*);
extern sexp* rlang_true_length(sexp* x);
extern sexp* rlang_squash(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_symbol(sexp*);
extern sexp* rlang_sym_as_character(sexp*);
extern sexp* rlang_tilde_eval(sexp*, sexp*, sexp*);
extern sexp* rlang_unescape_character(sexp*);
extern sexp* rlang_capturearginfo(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_capturedots(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_new_call_node(sexp*, sexp*);
extern sexp* rlang_cnd_signal(sexp*);
extern sexp* rlang_r_string(sexp*);
extern sexp* rlang_exprs_interp(sexp*, sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_quos_interp(sexp*, sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_dots_list(sexp*, sexp*, sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_dots_flat_list(sexp*, sexp*, sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_dots_pairlist(sexp*, sexp*, sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* r_new_formula(sexp*, sexp*, sexp*);
extern sexp* rlang_new_quosure(sexp*, sexp*);
extern sexp* rlang_enexpr(sexp*, sexp*);
extern sexp* rlang_ensym(sexp*, sexp*);
extern sexp* rlang_enquo(sexp*, sexp*);
extern sexp* rlang_get_expression(sexp*, sexp*);
extern sexp* rlang_vec_alloc(sexp*, sexp*);
extern sexp* rlang_vec_coerce(sexp*, sexp*);
extern sexp* rlang_mark_object(sexp*);
extern sexp* rlang_promise_expr(sexp*, sexp*);
extern sexp* rlang_promise_env(sexp*, sexp*);
extern sexp* rlang_promise_value(sexp*, sexp*);
extern sexp* rlang_unmark_object(sexp*);
extern sexp* rlang_quo_is_missing(sexp*);
extern sexp* rlang_quo_is_symbol(sexp*);
extern sexp* rlang_quo_is_call(sexp*);
extern sexp* rlang_quo_is_symbolic(sexp*);
extern sexp* rlang_quo_is_null(sexp*);
extern sexp* rlang_vec_poke_n(sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_vec_poke_range(sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_quo_get_expr(sexp*);
extern sexp* rlang_quo_set_expr(sexp*, sexp*);
extern sexp* rlang_quo_get_env(sexp*);
extern sexp* rlang_quo_set_env(sexp*, sexp*);
extern sexp* rlang_which_operator(sexp*);
extern sexp* rlang_new_data_mask(sexp*, sexp*);
extern sexp* rlang_new_data_mask_compat(sexp*, sexp*, sexp*);
extern sexp* rlang_as_data_mask(sexp*);
extern sexp* rlang_as_data_mask_compat(sexp*, sexp*);
extern sexp* rlang_data_mask_clean(sexp*);
extern sexp* rlang_as_data_pronoun(sexp*);
extern sexp* rlang_env_get(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_env_get_list(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_env_unlock(sexp*);
extern sexp* rlang_interrupt();
extern sexp* rlang_is_list(sexp*, sexp*);
extern sexp* rlang_is_atomic(sexp*, sexp*);
extern sexp* rlang_is_vector(sexp*, sexp*);
extern sexp* rlang_is_finite(sexp*);
extern sexp* rlang_is_logical(sexp*, sexp*);
extern sexp* rlang_is_integer(sexp*, sexp*);
extern sexp* rlang_is_double(sexp*, sexp*, sexp*);
extern sexp* rlang_is_integerish(sexp*, sexp*, sexp*);
extern sexp* rlang_is_character(sexp*, sexp*);
extern sexp* rlang_is_raw(sexp*, sexp*);
extern sexp* rlang_is_data_mask(sexp*);
extern sexp* rlang_data_pronoun_get(sexp*, sexp*);
extern sexp* rlang_cnd_type(sexp*);
extern sexp* rlang_env_inherits(sexp*, sexp*);
extern sexp* rlang_eval_top(sexp*, sexp*);
extern sexp* rlang_attrib(sexp*);
extern sexp* rlang_named(sexp*, sexp*);
extern sexp* r_pairlist_rev(sexp*);
extern sexp* rlang_new_splice_box(sexp*);
extern sexp* rlang_is_splice_box(sexp*);
extern sexp* rlang_unbox(sexp*);
extern sexp* rlang_new_function(sexp*, sexp*, sexp*);
extern sexp* rlang_is_string(sexp*, sexp*);
extern sexp* rlang_new_weakref(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_wref_key(sexp*);
extern sexp* rlang_wref_value(sexp*);
extern sexp* rlang_is_weakref(sexp*);
extern sexp* rlang_find_var(sexp*, sexp*);
extern sexp* rlang_env_bind_list(sexp*, sexp*, sexp*);
extern sexp* rlang_glue_is_there();
extern sexp* rlang_linked_version();
extern sexp* rlang_names2(sexp*, sexp*);
extern sexp* rlang_set_names(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_chr_get(sexp* x, sexp* i);
extern sexp* rlang_env_has(sexp*, sexp*, sexp*);
extern sexp* rlang_env_poke(sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_env_bind(sexp*, sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_raw_deparse_str(sexp*, sexp*, sexp*);
extern sexp* rlang_env_browse(sexp*, sexp*);
extern sexp* rlang_env_is_browsed(sexp*);
extern sexp* rlang_ns_registry_env();
extern sexp* rlang_hash(sexp*);
// Library initialisation defined below
sexp* rlang_library_load(sexp*);
sexp* rlang_library_unload();
// For unit tests
extern sexp* chr_prepend(sexp*, sexp*);
extern sexp* chr_append(sexp*, sexp*);
extern sexp* rlang_test_r_warn(sexp*);
extern sexp* rlang_on_exit(sexp*, sexp*);
extern sexp* rlang_test_is_special_op_sym(sexp*);
extern sexp* rlang_test_base_ns_get(sexp*);
extern sexp* rlang_test_parse(sexp*);
extern sexp* rlang_test_parse_eval(sexp*, sexp*);
extern sexp* r_current_frame();
extern sexp* rlang_test_node_list_clone_until(sexp*, sexp*);
extern sexp* rlang_test_sys_frame(sexp*);
extern sexp* rlang_test_sys_call(sexp*);
extern sexp* rlang_test_nms_are_duplicated(sexp*, sexp*);
extern sexp* rlang_test_Rf_warningcall(sexp*, sexp*);
extern sexp* rlang_test_Rf_errorcall(sexp*, sexp*);
extern sexp* rlang_test_lgl_sum(sexp*, sexp*);
extern sexp* rlang_test_lgl_which(sexp*, sexp*);
static const r_callable r_callables[] = {
{"r_init_library", (r_fn_ptr) &r_init_library, 0},
{"rlang_library_load", (r_fn_ptr) &rlang_library_load, 1},
{"rlang_library_unload", (r_fn_ptr) &rlang_library_unload, 0},
{"r_f_lhs", (r_fn_ptr) &r_f_lhs, 1},
{"r_f_rhs", (r_fn_ptr) &r_f_rhs, 1},
{"rlang_new_condition", (r_fn_ptr) &r_new_condition, 3},
{"rlang_replace_na", (r_fn_ptr) &rlang_replace_na, 2},
{"rlang_capturearginfo", (r_fn_ptr) &rlang_capturearginfo, 4},
{"rlang_capturedots", (r_fn_ptr) &rlang_capturedots, 4},
{"rlang_duplicate", (r_fn_ptr) &rlang_duplicate, 2},
{"rlang_node_tree_clone", (r_fn_ptr) &r_node_tree_clone, 1},
{"rlang_interp", (r_fn_ptr) &rlang_interp, 2},
{"rlang_is_function", (r_fn_ptr) &rlang_is_function, 1},
{"rlang_is_closure", (r_fn_ptr) &rlang_is_closure, 1},
{"rlang_is_primitive", (r_fn_ptr) &rlang_is_primitive, 1},
{"rlang_is_primitive_eager", (r_fn_ptr) &rlang_is_primitive_eager, 1},
{"rlang_is_primitive_lazy", (r_fn_ptr) &rlang_is_primitive_lazy, 1},
{"rlang_is_formula", (r_fn_ptr) &rlang_is_formula, 3},
{"rlang_is_formulaish", (r_fn_ptr) &rlang_is_formulaish, 3},
{"rlang_is_reference", (r_fn_ptr) &rlang_is_reference, 2},
{"rlang_length", (r_fn_ptr) &rlang_length, 1},
{"rlang_true_length", (r_fn_ptr) &rlang_true_length, 1},
{"rlang_attrib", (r_fn_ptr) &r_attrib, 1},
{"rlang_poke_attrib", (r_fn_ptr) &r_poke_attrib, 2},
{"rlang_missing_arg", (r_fn_ptr) &rlang_missing_arg, 0},
{"rlang_node_car", (r_fn_ptr) &rlang_node_car, 1},
{"rlang_node_cdr", (r_fn_ptr) &rlang_node_cdr, 1},
{"rlang_node_caar", (r_fn_ptr) &rlang_node_caar, 1},
{"rlang_node_cadr", (r_fn_ptr) &rlang_node_cadr, 1},
{"rlang_node_cdar", (r_fn_ptr) &rlang_node_cdar, 1},
{"rlang_node_cddr", (r_fn_ptr) &rlang_node_cddr, 1},
{"rlang_node_poke_car", (r_fn_ptr) &rlang_node_poke_car, 2},
{"rlang_node_poke_cdr", (r_fn_ptr) &rlang_node_poke_cdr, 2},
{"rlang_node_poke_caar", (r_fn_ptr) &rlang_node_poke_caar, 2},
{"rlang_node_poke_cadr", (r_fn_ptr) &rlang_node_poke_cadr, 2},
{"rlang_node_poke_cdar", (r_fn_ptr) &rlang_node_poke_cdar, 2},
{"rlang_node_poke_cddr", (r_fn_ptr) &rlang_node_poke_cddr, 2},
{"rlang_new_node", (r_fn_ptr) &r_new_node, 2},
{"rlang_nms_are_duplicated", (r_fn_ptr) &rlang_test_nms_are_duplicated, 2},
{"rlang_env_clone", (r_fn_ptr) &r_env_clone, 2},
{"rlang_env_unbind", (r_fn_ptr) &rlang_env_unbind, 3},
{"rlang_env_poke_parent", (r_fn_ptr) &rlang_env_poke_parent, 2},
{"rlang_env_frame", (r_fn_ptr) &rlang_env_frame, 1},
{"rlang_env_hash_table", (r_fn_ptr) &rlang_env_hash_table, 1},
{"rlang_poke_type", (r_fn_ptr) &rlang_poke_type, 2},
{"rlang_mark_object", (r_fn_ptr) &rlang_mark_object, 1},
{"rlang_promise_expr", (r_fn_ptr) &rlang_promise_expr, 2},
{"rlang_promise_env", (r_fn_ptr) &rlang_promise_env, 2},
{"rlang_promise_value", (r_fn_ptr) &rlang_promise_value, 2},
{"rlang_unmark_object", (r_fn_ptr) &rlang_unmark_object, 1},
{"rlang_node_tag", (r_fn_ptr) &rlang_node_tag, 1},
{"rlang_node_poke_tag", (r_fn_ptr) &rlang_node_poke_tag, 2},
{"rlang_squash", (r_fn_ptr) &rlang_squash, 4},
{"rlang_sexp_address", (r_fn_ptr) &rlang_sexp_address, 1},
{"rlang_symbol", (r_fn_ptr) &rlang_symbol, 1},
{"rlang_sym_as_character", (r_fn_ptr) &rlang_sym_as_character, 1},
// No longer necessary but keep this around for a while in case
// quosures ended up saved as RDS.
{"rlang_tilde_eval", (r_fn_ptr) &rlang_tilde_eval, 3},
{"rlang_unescape_character", (r_fn_ptr) &rlang_unescape_character, 1},
{"rlang_new_call", (r_fn_ptr) &rlang_new_call_node, 2},
{"rlang_cnd_signal", (r_fn_ptr) &rlang_cnd_signal, 1},
{"rlang_test_chr_prepend", (r_fn_ptr) &chr_prepend, 2},
{"rlang_test_chr_append", (r_fn_ptr) &chr_append, 2},
{"rlang_test_r_warn", (r_fn_ptr) &rlang_test_r_warn, 1},
{"rlang_test_r_on_exit", (r_fn_ptr) &rlang_on_exit, 2},
{"rlang_test_is_special_op_sym", (r_fn_ptr) &rlang_test_is_special_op_sym, 1},
{"rlang_test_base_ns_get", (r_fn_ptr) &rlang_test_base_ns_get, 1},
{"rlang_test_current_frame", (r_fn_ptr) &r_current_frame, 0},
{"rlang_test_parse", (r_fn_ptr) &rlang_test_parse, 1},
{"rlang_test_parse_eval", (r_fn_ptr) &rlang_test_parse_eval, 2},
{"rlang_test_node_list_clone_until", (r_fn_ptr) &rlang_test_node_list_clone_until, 2},
{"rlang_test_attrib_set", (r_fn_ptr) &r_attrib_set, 3},
{"rlang_test_sys_frame", (r_fn_ptr) &rlang_test_sys_frame, 1},
{"rlang_test_sys_call", (r_fn_ptr) &rlang_test_sys_call, 1},
{"rlang_test_Rf_warningcall", (r_fn_ptr) &rlang_test_Rf_warningcall, 2},
{"rlang_test_Rf_errorcall", (r_fn_ptr) &rlang_test_Rf_errorcall, 2},
{"rlang_test_lgl_sum", (r_fn_ptr) &rlang_test_lgl_sum, 2},
{"rlang_test_lgl_which", (r_fn_ptr) &rlang_test_lgl_which, 2},
{"rlang_r_string", (r_fn_ptr) &rlang_r_string, 1},
{"rlang_exprs_interp", (r_fn_ptr) &rlang_exprs_interp, 6},
{"rlang_quos_interp", (r_fn_ptr) &rlang_quos_interp, 6},
{"rlang_dots_list", (r_fn_ptr) &rlang_dots_list, 7},
{"rlang_dots_flat_list", (r_fn_ptr) &rlang_dots_flat_list, 7},
{"rlang_dots_pairlist", (r_fn_ptr) &rlang_dots_pairlist, 7},
{"rlang_new_formula", (r_fn_ptr) &r_new_formula, 3},
{"rlang_new_quosure", (r_fn_ptr) &rlang_new_quosure, 2},
{"rlang_enexpr", (r_fn_ptr) &rlang_enexpr, 2},
{"rlang_ensym", (r_fn_ptr) &rlang_ensym, 2},
{"rlang_enquo", (r_fn_ptr) &rlang_enquo, 2},
{"rlang_get_expression", (r_fn_ptr) &rlang_get_expression, 2},
{"rlang_vec_alloc", (r_fn_ptr) &rlang_vec_alloc, 2},
{"rlang_vec_coerce", (r_fn_ptr) &rlang_vec_coerce, 2},
{"rlang_quo_is_symbol", (r_fn_ptr) &rlang_quo_is_symbol, 1},
{"rlang_quo_is_call", (r_fn_ptr) &rlang_quo_is_call, 1},
{"rlang_quo_is_symbolic", (r_fn_ptr) &rlang_quo_is_symbolic, 1},
{"rlang_quo_is_missing", (r_fn_ptr) &rlang_quo_is_missing, 1},
{"rlang_quo_is_null", (r_fn_ptr) &rlang_quo_is_null, 1},
{"rlang_quo_get_expr", (r_fn_ptr) &rlang_quo_get_expr, 1},
{"rlang_quo_set_expr", (r_fn_ptr) &rlang_quo_set_expr, 2},
{"rlang_quo_get_env", (r_fn_ptr) &rlang_quo_get_env, 1},
{"rlang_quo_set_env", (r_fn_ptr) &rlang_quo_set_env, 2},
{"rlang_vec_poke_n", (r_fn_ptr) &rlang_vec_poke_n, 5},
{"rlang_vec_poke_range", (r_fn_ptr) &rlang_vec_poke_range, 5},
{"rlang_which_operator", (r_fn_ptr) &rlang_which_operator, 1},
{"rlang_call_has_precedence", (r_fn_ptr) &rlang_call_has_precedence, 3},
{"rlang_new_data_mask", (r_fn_ptr) &rlang_new_data_mask, 2},
{"rlang_as_data_mask", (r_fn_ptr) &rlang_as_data_mask, 1},
{"rlang_is_data_mask", (r_fn_ptr) &rlang_is_data_mask, 1},
{"rlang_data_pronoun_get", (r_fn_ptr) &rlang_data_pronoun_get, 2},
{"rlang_data_mask_clean", (r_fn_ptr) &rlang_data_mask_clean, 1},
{"rlang_as_data_pronoun", (r_fn_ptr) &rlang_as_data_pronoun, 1},
{"rlang_env_binding_types", (r_fn_ptr) &r_env_binding_types, 2},
{"rlang_env_get", (r_fn_ptr) &rlang_env_get, 4},
{"rlang_env_get_list", (r_fn_ptr) &rlang_env_get_list, 4},
{"rlang_env_unlock", (r_fn_ptr) &rlang_env_unlock, 1},
{"rlang_interrupt", (r_fn_ptr) &rlang_interrupt, 0},
{"rlang_is_list", (r_fn_ptr) &rlang_is_list, 2},
{"rlang_is_atomic", (r_fn_ptr) &rlang_is_atomic, 2},
{"rlang_is_vector", (r_fn_ptr) &rlang_is_vector, 2},
{"rlang_is_finite", (r_fn_ptr) &rlang_is_finite, 1},
{"rlang_is_logical", (r_fn_ptr) &rlang_is_logical, 2},
{"rlang_is_integer", (r_fn_ptr) &rlang_is_integer, 2},
{"rlang_is_double", (r_fn_ptr) &rlang_is_double, 3},
{"rlang_is_integerish", (r_fn_ptr) &rlang_is_integerish, 3},
{"rlang_is_character", (r_fn_ptr) &rlang_is_character, 2},
{"rlang_is_raw", (r_fn_ptr) &rlang_is_raw, 2},
{"rlang_cnd_type", (r_fn_ptr) &rlang_cnd_type, 1},
{"rlang_env_inherits", (r_fn_ptr) &rlang_env_inherits, 2},
{"rlang_eval_top", (r_fn_ptr) &rlang_eval_top, 2},
{"rlang_named", (r_fn_ptr) &rlang_named, 2},
{"rlang_pairlist_rev", (r_fn_ptr) &r_pairlist_rev, 1},
{"rlang_new_splice_box", (r_fn_ptr) &rlang_new_splice_box, 1},
{"rlang_is_splice_box", (r_fn_ptr) &rlang_is_splice_box, 1},
{"rlang_new_function", (r_fn_ptr) &rlang_new_function, 3},
{"rlang_is_string", (r_fn_ptr) &rlang_is_string, 2},
{"rlang_new_weakref", (r_fn_ptr) &rlang_new_weakref, 4},
{"rlang_wref_key", (r_fn_ptr) &rlang_wref_key, 1},
{"rlang_wref_value", (r_fn_ptr) &rlang_wref_value, 1},
{"rlang_is_weakref", (r_fn_ptr) &rlang_is_weakref, 1},
{"rlang_find_var", (r_fn_ptr) &rlang_find_var, 2},
{"rlang_env_bind_list", (r_fn_ptr) &rlang_env_bind_list, 3},
{"rlang_glue_is_there", (r_fn_ptr) &rlang_glue_is_there, 0},
{"rlang_linked_version", (r_fn_ptr) &rlang_linked_version, 0},
{"rlang_names2", (r_fn_ptr) &rlang_names2, 2},
{"rlang_set_names", (r_fn_ptr) &rlang_set_names, 4},
{"rlang_chr_get", (r_fn_ptr) &rlang_chr_get, 2},
{"rlang_env_has", (r_fn_ptr) &rlang_env_has, 3},
{"rlang_env_poke", (r_fn_ptr) &rlang_env_poke, 5},
{"rlang_env_bind", (r_fn_ptr) &rlang_env_bind, 5},
{"rlang_raw_deparse_str", (r_fn_ptr) &rlang_raw_deparse_str, 3},
{"rlang_env_browse", (r_fn_ptr) &rlang_env_browse, 2},
{"rlang_env_is_browsed", (r_fn_ptr) &rlang_env_is_browsed, 1},
{"rlang_ns_registry_env", (r_fn_ptr) &rlang_ns_registry_env, 0},
{"rlang_hash", (r_fn_ptr) &rlang_hash, 1},
{NULL, NULL, 0}
};
extern sexp* rlang_ext_arg_match0(sexp*);
extern sexp* rlang_ext_capturearginfo(sexp*);
extern sexp* rlang_ext_capturedots(sexp*);
extern sexp* rlang_ext_dots_values(sexp*);
extern sexp* rlang_ext2_call2(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_ext2_exec(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_ext2_eval(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_ext2_eval_tidy(sexp*, sexp*, sexp*, sexp*);
extern sexp* rlang_ext2_tilde_eval(sexp*, sexp*, sexp*, sexp*);
static const r_external externals[] = {
{"rlang_ext_arg_match0", (r_fn_ptr) &rlang_ext_arg_match0, 3},
{"rlang_ext_capturearginfo", (r_fn_ptr) &rlang_ext_capturearginfo, 2},
{"rlang_ext_capturedots", (r_fn_ptr) &rlang_ext_capturedots, 1},
{"rlang_ext_dots_values", (r_fn_ptr) &rlang_ext_dots_values, 7},
{"rlang_ext2_call2", (r_fn_ptr) &rlang_ext2_call2, 2},
{"rlang_ext2_exec", (r_fn_ptr) &rlang_ext2_exec, 2},
{"rlang_ext2_eval", (r_fn_ptr) &rlang_ext2_eval, 2},
{"rlang_ext2_eval_tidy", (r_fn_ptr) &rlang_ext2_eval_tidy, 3},
{"rlang_ext2_tilde_eval", (r_fn_ptr) &rlang_ext2_tilde_eval, 3},
{NULL, NULL, 0}
};
extern bool is_splice_box(sexp*);
extern sexp* rlang_env_dots_values(sexp*);
extern sexp* rlang_env_dots_list(sexp*);
extern sexp* rlang_eval_tidy(sexp*, sexp*, sexp*);
extern void rlang_print_backtrace(bool full);
export void R_init_rlang(r_dll_info* dll) {
// The quosure functions are stable
r_register_c_callable("rlang", "rlang_new_quosure", (r_fn_ptr) &rlang_new_quosure);
r_register_c_callable("rlang", "rlang_is_quosure", (r_fn_ptr) &rlang_is_quosure);
r_register_c_callable("rlang", "rlang_quo_get_expr", (r_fn_ptr) &rlang_quo_get_expr);
r_register_c_callable("rlang", "rlang_quo_set_expr", (r_fn_ptr) &rlang_quo_set_expr);
r_register_c_callable("rlang", "rlang_quo_get_env", (r_fn_ptr) &rlang_quo_get_env);
r_register_c_callable("rlang", "rlang_quo_set_env", (r_fn_ptr) &rlang_quo_set_env);
// The data mask functions are stable
r_register_c_callable("rlang", "rlang_as_data_pronoun", (r_fn_ptr) &rlang_as_data_pronoun);
r_register_c_callable("rlang", "rlang_as_data_mask_3.0.0", (r_fn_ptr) &rlang_as_data_mask);
r_register_c_callable("rlang", "rlang_new_data_mask_3.0.0", (r_fn_ptr) &rlang_new_data_mask);
// eval_tidy() is stable
r_register_c_callable("rlang", "rlang_eval_tidy", (r_fn_ptr) &rlang_eval_tidy);
// Maturing
r_register_c_callable("rlang", "rlang_is_splice_box", (r_fn_ptr) &is_splice_box);
r_register_c_callable("rlang", "rlang_unbox", (r_fn_ptr) &rlang_unbox);
r_register_c_callable("rlang", "rlang_env_dots_values", (r_fn_ptr) &rlang_env_dots_values);
r_register_c_callable("rlang", "rlang_env_dots_list", (r_fn_ptr) &rlang_env_dots_list);
r_register_c_callable("rlang", "rlang_sym_as_character", (r_fn_ptr) &rlang_sym_as_character);
r_register_c_callable("rlang", "rlang_str_as_symbol", (r_fn_ptr) &r_str_as_symbol);
// Experimental method for exporting C function pointers as actual R objects
rlang_register_pointer("rlang", "rlang_test_is_spliceable", (r_fn_ptr) &rlang_is_clevel_spliceable);
// Experimental
r_register_c_callable("rlang", "rlang_squash_if", (r_fn_ptr) &r_squash_if);
// Compatibility
r_register_c_callable("rlang", "rlang_as_data_mask", (r_fn_ptr) &rlang_as_data_mask_compat);
r_register_c_callable("rlang", "rlang_new_data_mask", (r_fn_ptr) &rlang_new_data_mask_compat);
// Only for debugging - no stability guaranteed
r_register_c_callable("rlang", "rlang_print_backtrace", (r_fn_ptr) &rlang_print_backtrace);
r_register_r_callables(dll, r_callables, externals);
}
// From "../internal/internal.h"
void rlang_init_internal(sexp* ns);
sexp* rlang_library_load(sexp* ns) {
rlang_init_internal(ns);
return r_null;
}
sexp* rlang_library_unload() {
return r_null;
}
| 54.863636 | 102 | 0.66642 |
d8c295c85d4cc8fec2d2f319c82b32e811485b88 | 1,777 | h | C | drivers/wdm/usb/driver/bulkusb/sys/bulkwmi.h | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | drivers/wdm/usb/driver/bulkusb/sys/bulkwmi.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | drivers/wdm/usb/driver/bulkusb/sys/bulkwmi.h | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | /*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
bulkwmi.h
Abstract:
Environment:
Kernel mode
Notes:
Copyright (c) 2000 Microsoft Corporation.
All Rights Reserved.
--*/
#ifndef _BULKUSB_WMI_H
#define _BULKUSB_WMI_H
NTSTATUS
BulkUsb_WmiRegistration(
IN OUT PDEVICE_EXTENSION DeviceExtension
);
NTSTATUS
BulkUsb_WmiDeRegistration(
IN OUT PDEVICE_EXTENSION DeviceExtension
);
NTSTATUS
BulkUsb_DispatchSysCtrl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
);
NTSTATUS
BulkUsb_QueryWmiRegInfo(
IN PDEVICE_OBJECT DeviceObject,
OUT ULONG *RegFlags,
OUT PUNICODE_STRING InstanceName,
OUT PUNICODE_STRING *RegistryPath,
OUT PUNICODE_STRING MofResourceName,
OUT PDEVICE_OBJECT *Pdo
);
NTSTATUS
BulkUsb_SetWmiDataItem(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN ULONG GuidIndex,
IN ULONG InstanceIndex,
IN ULONG DataItemId,
IN ULONG BufferSize,
IN PUCHAR Buffer
);
NTSTATUS
BulkUsb_SetWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN ULONG GuidIndex,
IN ULONG InstanceIndex,
IN ULONG BufferSize,
IN PUCHAR Buffer
);
NTSTATUS
BulkUsb_QueryWmiDataBlock(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN ULONG GuidIndex,
IN ULONG InstanceIndex,
IN ULONG InstanceCount,
IN OUT PULONG InstanceLengthArray,
IN ULONG OutBufferSize,
OUT PUCHAR Buffer
);
PCHAR
WMIMinorFunctionString (
UCHAR MinorFunction
);
#endif | 19.966292 | 47 | 0.617895 |
d8c3cd67d4f7c3a4110bcaeb0d7422c5bc6cef0c | 3,608 | h | C | RPC/JSONRPC2/JSONRPC2Client.h | wolfgang1991/CommonLibraries | 949251019cc8dd532938d16ab85a4e772eb6817e | [
"Zlib"
] | null | null | null | RPC/JSONRPC2/JSONRPC2Client.h | wolfgang1991/CommonLibraries | 949251019cc8dd532938d16ab85a4e772eb6817e | [
"Zlib"
] | 1 | 2020-07-31T13:20:54.000Z | 2020-08-06T15:45:39.000Z | RPC/JSONRPC2/JSONRPC2Client.h | wolfgang1991/CommonLibraries | 949251019cc8dd532938d16ab85a4e772eb6817e | [
"Zlib"
] | null | null | null | #ifndef JSONRPC2Client_H_INCLUDED
#define JSONRPC2Client_H_INCLUDED
#include <IRPC.h>
#include <SimpleSockets.h>
#include <Threading.h>
#include <JSONParser.h>
#include <limits>
#include <map>
#define PING_DISABLE_SEND_PERIOD ~(uint32_t)0
//#define DONT_CHECK_JSON_RPC_VERSION
std::string convertRPCValueToJSONResult(const IRPCValue& value, uint32_t jsonId);
//! values may be empty, jsonId may be NULL if no result is expected
std::string makeJSONRPCRequest(const std::string& procedure, const std::vector<IRPCValue*>& values, uint32_t* jsonId);
//! deletes all Elements from a container e.g. std::vector or std::list etc..
template<typename TContainer>
void deleteAllElements(TContainer& ctr){
for(auto it = ctr.begin(); it != ctr.end(); ++it){
delete *it;
}
}
//! returns a field if available or NULL if not available and removes the field from the object
IRPCValue* stealObjectField(ObjectValue* o, const std::string& key);
//! returns a field with the given type and name (key) if available otherwise NULL
IRPCValue* getObjectField(ObjectValue* o, const std::string& key, IRPCValue::Type type = IRPCValue::UNKNOWN);
//! returns a field with the given type and name (key) if available otherwise NULL
template<typename TRPCValue>
TRPCValue* getObjectField(ObjectValue* o, const std::string& key){
return (TRPCValue*)getObjectField(o, key, TRPCValue::typeId);
}
//! Implementation for JSON-RPC (only Integers allowed and handled for the ids in JSON-RPC)
class JSONRPC2Client : public IRPCClient{
private:
//for main thread:
ClientState syncedState;
double syncedLastReceived;//time in s
std::list<std::string> mainToSend;
std::list<IRPCValue*> mainToReceive;
//for receiving results:
std::map<uint32_t, std::pair<IRemoteProcedureCaller*, uint32_t> > jsonId2Caller;//jsonId -> (Caller, idFromCaller)
uint32_t maxJsonId;
std::list<uint32_t> reusableIds;//old Ids which can be reused
//for receiving calls:
std::map<std::string, IRemoteProcedureCallReceiver*> receivers;
//for synchronization:
Mutex mutexSync;
bool areTherePendingSends;
double lastReceived;//time in s
ClientState state;
bool syncExit;
bool mustJoin;
std::list<std::string> syncToSend;
std::list<IRPCValue*> syncToReceive;
//for clientMain thread:
IMetaProtocolHandler* metaProtocolHandler;
std::list<std::string> clientToSend;
std::list<IRPCValue*> clientToReceive;
JSONParser* parser;
IIPAddress* address;
ISocket* socket;
uint32_t pingSendPeriod, pingTimeout, connectTimeout;
static void* clientMain(void* p);
Thread clientThread;
//! for main thread
void handleEntity(IRPCValue* entity);
public:
JSONRPC2Client();
~JSONRPC2Client();
bool callRemoteProcedure(const std::string& procedure, const std::vector<IRPCValue*>& values, IRemoteProcedureCaller* caller = NULL, uint32_t id = 0, bool deleteValues = true);
void registerCallReceiver(const std::string& procedure, IRemoteProcedureCallReceiver* receiver);
void unregisterCallReceiver(const std::string& procedure, IRemoteProcedureCallReceiver* receiver = NULL);
void connect(const IIPAddress& address, uint32_t pingSendPeriod, uint32_t pingTimeout, uint32_t connectTimeout, IMetaProtocolHandler* metaProtocolHandler = NULL);
//! Alternative to connect
void useSocket(ISocket* socket, uint32_t pingTimeout, uint32_t pingSendPeriod = PING_DISABLE_SEND_PERIOD);
void update();
IRPCClient::ClientState getState() const;
bool isConnected() const;
void disconnect();
void removeProcedureCaller(IRemoteProcedureCaller* caller);
double getLastReceiveTime();
void flush();
};
#endif
| 30.066667 | 177 | 0.766075 |
d8c4f6d718b00632ffd2115a64c0d16bf537d7b8 | 1,207 | h | C | include/cms/ContentEncryptionAlgorithmIdentifier.h | Denisss025/cms-pkcs7 | c0492240da5e81fa37e47fcca73fa16bc83674d8 | [
"BSD-2-Clause"
] | 7 | 2018-07-19T10:03:58.000Z | 2021-09-19T11:27:09.000Z | include/cms/ContentEncryptionAlgorithmIdentifier.h | Denisss025/cms-pkcs7 | c0492240da5e81fa37e47fcca73fa16bc83674d8 | [
"BSD-2-Clause"
] | null | null | null | include/cms/ContentEncryptionAlgorithmIdentifier.h | Denisss025/cms-pkcs7 | c0492240da5e81fa37e47fcca73fa16bc83674d8 | [
"BSD-2-Clause"
] | null | null | null | /*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "CryptographicMessageSyntax2004"
* found in "../rfc5652-CryptographicMessageSyntax2004.asn1"
*/
#ifndef _ContentEncryptionAlgorithmIdentifier_H_
#define _ContentEncryptionAlgorithmIdentifier_H_
#include <asn_application.h>
/* Including external dependencies */
#include "AlgorithmIdentifier.h"
#ifdef __cplusplus
extern "C" {
#endif
/* ContentEncryptionAlgorithmIdentifier */
typedef AlgorithmIdentifier_t ContentEncryptionAlgorithmIdentifier_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ContentEncryptionAlgorithmIdentifier;
asn_struct_free_f ContentEncryptionAlgorithmIdentifier_free;
asn_struct_print_f ContentEncryptionAlgorithmIdentifier_print;
asn_constr_check_f ContentEncryptionAlgorithmIdentifier_constraint;
ber_type_decoder_f ContentEncryptionAlgorithmIdentifier_decode_ber;
der_type_encoder_f ContentEncryptionAlgorithmIdentifier_encode_der;
xer_type_decoder_f ContentEncryptionAlgorithmIdentifier_decode_xer;
xer_type_encoder_f ContentEncryptionAlgorithmIdentifier_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _ContentEncryptionAlgorithmIdentifier_H_ */
#include <asn_internal.h>
| 30.948718 | 74 | 0.866611 |
d8c50da4b3f966dfdb9c56b7e821698c9589723d | 655 | h | C | include/checked_program.h | amSangi/SimpleInterpreter | cbfcfccbe7740f3853e6d108264eb228843932c5 | [
"MIT"
] | null | null | null | include/checked_program.h | amSangi/SimpleInterpreter | cbfcfccbe7740f3853e6d108264eb228843932c5 | [
"MIT"
] | null | null | null | include/checked_program.h | amSangi/SimpleInterpreter | cbfcfccbe7740f3853e6d108264eb228843932c5 | [
"MIT"
] | null | null | null | #pragma once
#include "program.h"
#include "symbol_table.h"
#include "static_type.h"
class CheckedProgram
{
typedef std::shared_ptr<StaticType> TypePtr;
public:
CheckedProgram(std::shared_ptr<Program> program,
SymbolTable<TypePtr> table)
: program_(std::move(program)),
symbol_table_(table) {}
std::shared_ptr<Program> GetProgram() { return program_; }
SymbolTable<TypePtr> GetSymbolTable() { return symbol_table_; }
private:
std::shared_ptr<Program> program_;
SymbolTable<TypePtr> symbol_table_;
}; // class CheckedProgram | 28.478261 | 103 | 0.625954 |
d8c5dc9b2f2044d67ee5a0b1a599ae12bc4f6768 | 10,877 | c | C | src/vlib/linux/physmem.c | wililupy/vpp | 4b0ac82a739bf7f1233ebb61269e27aa4cf9ab36 | [
"Apache-2.0"
] | null | null | null | src/vlib/linux/physmem.c | wililupy/vpp | 4b0ac82a739bf7f1233ebb61269e27aa4cf9ab36 | [
"Apache-2.0"
] | null | null | null | src/vlib/linux/physmem.c | wililupy/vpp | 4b0ac82a739bf7f1233ebb61269e27aa4cf9ab36 | [
"Apache-2.0"
] | null | null | null | /*
* Copyright (c) 2015 Cisco and/or its affiliates.
* 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.
*/
/*
* physmem.c: Unix physical memory
*
* Copyright (c) 2008 Eliot Dresselhaus
*
* 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.
*/
#include <unistd.h>
#include <sys/types.h>
#include <sys/mount.h>
#include <sys/mman.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#include <numa.h>
#include <numaif.h>
#include <vlib/vlib.h>
#include <vlib/physmem.h>
#include <vlib/unix/unix.h>
#include <vlib/linux/syscall.h>
#include <vlib/linux/sysfs.h>
static void *
unix_physmem_alloc_aligned (vlib_main_t * vm, vlib_physmem_region_index_t idx,
uword n_bytes, uword alignment)
{
vlib_physmem_region_t *pr = vlib_physmem_get_region (vm, idx);
uword lo_offset, hi_offset;
uword *to_free = 0;
if (pr->heap == 0)
return 0;
/* IO memory is always at least cache aligned. */
alignment = clib_max (alignment, CLIB_CACHE_LINE_BYTES);
while (1)
{
mheap_get_aligned (pr->heap, n_bytes,
/* align */ alignment,
/* align offset */ 0,
&lo_offset);
/* Allocation failed? */
if (lo_offset == ~0)
break;
if (pr->flags & VLIB_PHYSMEM_F_FAKE)
break;
/* Make sure allocation does not span DMA physical chunk boundary. */
hi_offset = lo_offset + n_bytes - 1;
if ((lo_offset >> pr->log2_page_size) ==
(hi_offset >> pr->log2_page_size))
break;
/* Allocation would span chunk boundary, queue it to be freed as soon as
we find suitable chunk. */
vec_add1 (to_free, lo_offset);
}
if (to_free != 0)
{
uword i;
for (i = 0; i < vec_len (to_free); i++)
mheap_put (pr->heap, to_free[i]);
vec_free (to_free);
}
return lo_offset != ~0 ? pr->heap + lo_offset : 0;
}
static void
unix_physmem_free (vlib_main_t * vm, vlib_physmem_region_index_t idx, void *x)
{
vlib_physmem_region_t *pr = vlib_physmem_get_region (vm, idx);
/* Return object to region's heap. */
mheap_put (pr->heap, x - pr->heap);
}
static u64
get_page_paddr (int fd, uword addr)
{
int pagesize = sysconf (_SC_PAGESIZE);
u64 seek, pagemap = 0;
seek = ((u64) addr / pagesize) * sizeof (u64);
if (lseek (fd, seek, SEEK_SET) != seek)
{
clib_unix_warning ("lseek to 0x%llx", seek);
return 0;
}
if (read (fd, &pagemap, sizeof (pagemap)) != (sizeof (pagemap)))
{
clib_unix_warning ("read ptbits");
return 0;
}
if ((pagemap & (1ULL << 63)) == 0)
return 0;
pagemap &= pow2_mask (55);
return pagemap * pagesize;
}
static clib_error_t *
unix_physmem_region_alloc (vlib_main_t * vm, char *name, u32 size,
u8 numa_node, u32 flags,
vlib_physmem_region_index_t * idx)
{
vlib_physmem_main_t *vpm = &vm->physmem_main;
vlib_physmem_region_t *pr;
clib_error_t *error = 0;
int pagemap_fd = -1;
u8 *mount_dir = 0;
u8 *filename = 0;
struct stat st;
int old_mpol;
int mmap_flags;
struct bitmask *old_mask = numa_allocate_nodemask ();
if (geteuid () != 0 && (flags & VLIB_PHYSMEM_F_FAKE) == 0)
return clib_error_return (0, "not allowed");
pool_get (vpm->regions, pr);
if ((pr - vpm->regions) >= 256)
{
error = clib_error_return (0, "maximum number of regions reached");
goto error;
}
pr->index = pr - vpm->regions;
pr->fd = -1;
pr->flags = flags;
if (get_mempolicy (&old_mpol, old_mask->maskp, old_mask->size + 1, NULL, 0)
== -1)
{
if ((flags & VLIB_PHYSMEM_F_FAKE) == 0)
{
error = clib_error_return_unix (0, "get_mempolicy");
goto error;
}
else
old_mpol = -1;
}
if ((flags & VLIB_PHYSMEM_F_FAKE) == 0)
{
if ((pagemap_fd = open ((char *) "/proc/self/pagemap", O_RDONLY)) == -1)
{
error = clib_error_return_unix (0, "open '/proc/self/pagemap'");
goto error;
}
mount_dir = format (0, "%s/physmem_region%d%c",
vlib_unix_get_runtime_dir (), pr->index, 0);
filename = format (0, "%s/mem%c", mount_dir, 0);
unlink ((char *) mount_dir);
error = vlib_unix_recursive_mkdir ((char *) mount_dir);
if (error)
goto error;
if (mount ("none", (char *) mount_dir, "hugetlbfs", 0, NULL))
{
error = clib_error_return_unix (0, "mount hugetlb directory '%s'",
mount_dir);
goto error;
}
if ((pr->fd = open ((char *) filename, O_CREAT | O_RDWR, 0755)) == -1)
{
error = clib_error_return_unix (0, "open");
goto error;
}
mmap_flags = MAP_SHARED | MAP_HUGETLB | MAP_LOCKED;
}
else
{
if ((pr->fd = memfd_create (name, MFD_ALLOW_SEALING)) == -1)
return clib_error_return_unix (0, "memfd_create");
if ((fcntl (pr->fd, F_ADD_SEALS, F_SEAL_SHRINK)) == -1)
{
error =
clib_error_return_unix (0, "fcntl (F_ADD_SEALS, F_SEAL_SHRINK)");
goto error;
}
mmap_flags = MAP_SHARED;
}
if (fstat (pr->fd, &st))
{
error = clib_error_return_unix (0, "fstat");
goto error;
}
pr->log2_page_size = min_log2 (st.st_blksize);
pr->n_pages = ((size - 1) >> pr->log2_page_size) + 1;
size = pr->n_pages * (1 << pr->log2_page_size);
if ((ftruncate (pr->fd, size)) == -1)
{
error = clib_error_return_unix (0, "ftruncate length: %d", size);
goto error;
}
if ((flags & VLIB_PHYSMEM_F_FAKE) == 0)
{
error = vlib_sysfs_prealloc_hugepages (numa_node,
1 << (pr->log2_page_size - 10),
pr->n_pages);
if (error)
goto error;
}
if (old_mpol != -1)
numa_set_preferred (numa_node);
pr->mem = mmap (0, size, (PROT_READ | PROT_WRITE), mmap_flags, pr->fd, 0);
if (pr->mem == MAP_FAILED)
{
pr->mem = 0;
error = clib_error_return_unix (0, "mmap");
goto error;
}
if (old_mpol != -1 &&
set_mempolicy (old_mpol, old_mask->maskp, old_mask->size + 1) == -1)
{
error = clib_error_return_unix (0, "set_mempolicy");
goto error;
}
pr->size = pr->n_pages << pr->log2_page_size;
pr->page_mask = (1 << pr->log2_page_size) - 1;
pr->numa_node = numa_node;
pr->name = format (0, "%s", name);
if ((flags & VLIB_PHYSMEM_F_FAKE) == 0)
{
int i;
for (i = 0; i < pr->n_pages; i++)
{
void *ptr = pr->mem + (i << pr->log2_page_size);
int node;
move_pages (0, 1, &ptr, 0, &node, 0);
if (numa_node != node)
{
clib_warning
("physmem page for region \'%s\' allocated on the wrong"
" numa node (requested %u actual %u)", pr->name,
pr->numa_node, node, i);
break;
}
}
}
if (flags & VLIB_PHYSMEM_F_INIT_MHEAP)
{
pr->heap = mheap_alloc_with_flags (pr->mem, pr->size,
/* Don't want mheap mmap/munmap with IO memory. */
MHEAP_FLAG_DISABLE_VM |
MHEAP_FLAG_THREAD_SAFE);
}
if (flags & VLIB_PHYSMEM_F_HAVE_BUFFERS)
{
vlib_buffer_add_mem_range (vm, pointer_to_uword (pr->mem), pr->size);
}
*idx = pr->index;
if ((flags & VLIB_PHYSMEM_F_FAKE) == 0)
{
int i;
for (i = 0; i < pr->n_pages; i++)
{
uword vaddr =
pointer_to_uword (pr->mem) + (((u64) i) << pr->log2_page_size);
u64 page_paddr = get_page_paddr (pagemap_fd, vaddr);
vec_add1 (pr->page_table, page_paddr);
}
}
goto done;
error:
if (pr->fd > -1)
close (pr->fd);
if (pr->mem)
munmap (pr->mem, size);
memset (pr, 0, sizeof (*pr));
pool_put (vpm->regions, pr);
done:
if (mount_dir)
{
umount2 ((char *) mount_dir, MNT_DETACH);
rmdir ((char *) mount_dir);
vec_free (mount_dir);
}
numa_free_cpumask (old_mask);
vec_free (filename);
if (pagemap_fd > -1)
close (pagemap_fd);
return error;
}
static void
unix_physmem_region_free (vlib_main_t * vm, vlib_physmem_region_index_t idx)
{
vlib_physmem_main_t *vpm = &vm->physmem_main;
vlib_physmem_region_t *pr = vlib_physmem_get_region (vm, idx);
if (pr->fd > 0)
close (pr->fd);
munmap (pr->mem, pr->size);
vec_free (pr->name);
pool_put (vpm->regions, pr);
}
clib_error_t *
unix_physmem_init (vlib_main_t * vm)
{
clib_error_t *error = 0;
/* Avoid multiple calls. */
if (vm->os_physmem_alloc_aligned)
return error;
vm->os_physmem_alloc_aligned = unix_physmem_alloc_aligned;
vm->os_physmem_free = unix_physmem_free;
vm->os_physmem_region_alloc = unix_physmem_region_alloc;
vm->os_physmem_region_free = unix_physmem_region_free;
return error;
}
static clib_error_t *
show_physmem (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
vlib_physmem_main_t *vpm = &vm->physmem_main;
vlib_physmem_region_t *pr;
/* *INDENT-OFF* */
pool_foreach (pr, vpm->regions, (
{
vlib_cli_output (vm, "index %u name '%s' page-size %uKB num-pages %d "
"numa-node %u fd %d\n",
pr->index, pr->name, (1 << (pr->log2_page_size -10)),
pr->n_pages, pr->numa_node, pr->fd);
if (pr->heap)
vlib_cli_output (vm, " %U", format_mheap, pr->heap, /* verbose */ 1);
else
vlib_cli_output (vm, " no heap\n");
}));
/* *INDENT-ON* */
return 0;
}
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (show_physmem_command, static) = {
.path = "show physmem",
.short_help = "Show physical memory allocation",
.function = show_physmem,
};
/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/
| 26.021531 | 78 | 0.636573 |
d8c61bf63509cab6319c0f1540bef3d338993d30 | 716 | h | C | benchmarks/milc/milc_qcd-7.8.1/include/ks_action_coeffs_qop.h | mcopik/perf-taint | 16613b83f504c114a77f7a22d587c29ce52d7a4b | [
"BSD-3-Clause"
] | 2 | 2020-10-20T09:27:07.000Z | 2021-03-22T05:10:24.000Z | benchmarks/milc/milc_qcd-7.8.1/include/ks_action_coeffs_qop.h | spcl/perf-taint | 16613b83f504c114a77f7a22d587c29ce52d7a4b | [
"BSD-3-Clause"
] | 11 | 2021-06-03T08:55:28.000Z | 2022-01-20T19:38:29.000Z | benchmarks/milc/milc_qcd-7.8.1/include/ks_action_coeffs_qop.h | mcopik/perf-taint | 16613b83f504c114a77f7a22d587c29ce52d7a4b | [
"BSD-3-Clause"
] | 1 | 2020-12-05T09:53:50.000Z | 2020-12-05T09:53:50.000Z | #ifndef _KS_ACTION_COEFFS_QOP_H
#define _KS_ACTION_COEFFS_QOP_H
#include "../include/complex.h"
#include "../include/ks_action_paths.h"
#include <qop.h>
/* ks_action_coeffs_qop.c */
QOP_asqtad_coeffs_t *create_asqtad_coeffs_qop(ks_action_paths *ap);
void destroy_asqtad_coeffs_qop(QOP_asqtad_coeffs_t *ac);
char *get_ac_string_asqtad_qop(QOP_asqtad_coeffs_t *ac);
QOP_hisq_coeffs_t *create_hisq_coeffs_qop(ks_action_paths_hisq *ap);
void destroy_hisq_coeffs_qop(QOP_hisq_coeffs_t *ac);
int get_n_naiks_qop(QOP_hisq_coeffs_t *ac);
double *get_eps_naik_qop(QOP_hisq_coeffs_t *ac);
int get_ugroup_qop(QOP_hisq_coeffs_t *ac);
char *get_ac_string_hisq_qop(QOP_hisq_coeffs_t *ac);
#endif /* _KS_ACTION_COEFFS_QOP_H */
| 34.095238 | 68 | 0.831006 |
d8cc694c985325320c78aaf5cae888ae55500f15 | 4,730 | h | C | deps/webrtc/include/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h | QueenConch/quick_start_webrtc_native | 0321fb204a076b437e0d708c2ec55cae6464c4f3 | [
"MIT"
] | 2 | 2018-07-04T00:29:09.000Z | 2020-07-05T09:24:59.000Z | deps/webrtc/include/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h | QueenConch/quick_start_webrtc_native | 0321fb204a076b437e0d708c2ec55cae6464c4f3 | [
"MIT"
] | null | null | null | deps/webrtc/include/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h | QueenConch/quick_start_webrtc_native | 0321fb204a076b437e0d708c2ec55cae6464c4f3 | [
"MIT"
] | null | null | null | /*
* Copyright (c) 2013, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ImageBufferSurface_h
#define ImageBufferSurface_h
#include "platform/PlatformExport.h"
#include "platform/geometry/IntSize.h"
#include "platform/graphics/CanvasColorParams.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/paint/PaintCanvas.h"
#include "platform/graphics/paint/PaintFlags.h"
#include "platform/graphics/paint/PaintRecord.h"
#include "platform/wtf/Allocator.h"
#include "platform/wtf/Noncopyable.h"
#include "third_party/khronos/GLES2/gl2.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "third_party/skia/include/core/SkRefCnt.h"
struct SkImageInfo;
namespace blink {
class FloatRect;
class GraphicsContext;
class ImageBuffer;
class StaticBitmapImage;
class WebLayer;
class PLATFORM_EXPORT ImageBufferSurface {
WTF_MAKE_NONCOPYABLE(ImageBufferSurface);
USING_FAST_MALLOC(ImageBufferSurface);
public:
virtual ~ImageBufferSurface();
virtual PaintCanvas* Canvas() = 0;
virtual void DisableDeferral(DisableDeferralReason) {}
virtual void WillOverwriteCanvas() {}
virtual void DidDraw(const FloatRect& rect) {}
virtual bool IsValid() const = 0;
virtual bool Restore() { return false; }
virtual WebLayer* Layer() const { return 0; }
virtual bool IsAccelerated() const { return false; }
virtual bool IsRecording() const { return false; }
virtual bool IsExpensiveToPaint() { return false; }
virtual void SetFilterQuality(SkFilterQuality) {}
virtual void SetIsHidden(bool) {}
virtual void SetImageBuffer(ImageBuffer*) {}
virtual sk_sp<PaintRecord> GetRecord();
virtual void FinalizeFrame() {}
virtual void DoPaintInvalidation(const FloatRect& dirty_rect) {}
virtual void Draw(GraphicsContext&,
const FloatRect& dest_rect,
const FloatRect& src_rect,
SkBlendMode);
virtual void SetHasExpensiveOp() {}
virtual GLuint GetBackingTextureHandleForOverwrite() { return 0; }
// Executes all deferred rendering immediately.
virtual void Flush(FlushReason);
// Like flush, but flushes all the way down to the GPU context if the surface
// uses the GPU.
virtual void FlushGpu(FlushReason reason) { Flush(reason); }
virtual void PrepareSurfaceForPaintingIfNeeded() {}
virtual bool WritePixels(const SkImageInfo& orig_info,
const void* pixels,
size_t row_bytes,
int x,
int y) = 0;
// May return nullptr if the surface is GPU-backed and the GPU context was
// lost.
virtual RefPtr<StaticBitmapImage> NewImageSnapshot(AccelerationHint,
SnapshotReason) = 0;
OpacityMode GetOpacityMode() const { return opacity_mode_; }
const IntSize& size() const { return size_; }
const CanvasColorParams& color_params() const { return color_params_; }
void NotifyIsValidChanged(bool is_valid) const;
protected:
ImageBufferSurface(const IntSize&, OpacityMode, const CanvasColorParams&);
void Clear();
private:
OpacityMode opacity_mode_;
IntSize size_;
CanvasColorParams color_params_;
};
} // namespace blink
#endif
| 38.145161 | 79 | 0.734038 |
d8ceb5b09333b8776b36982ae3ba7ec6ba1c352b | 938 | c | C | code/main.c | j-bill/IBANRechner | 838ed7975017c7a1d06707fc757eb9cd29dbabaf | [
"MIT"
] | null | null | null | code/main.c | j-bill/IBANRechner | 838ed7975017c7a1d06707fc757eb9cd29dbabaf | [
"MIT"
] | null | null | null | code/main.c | j-bill/IBANRechner | 838ed7975017c7a1d06707fc757eb9cd29dbabaf | [
"MIT"
] | null | null | null | /*
# IBANRechner
# main.c
# Copyright (c) 2019 j-bill
# github.com/j-bill
# This file is part of "IBANRechner" which is released under the MIT license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <conio.h>
#include <string.h>
#include "functions.c"
#include "calculator.c"
#include "validator.c"
int main()
{
header();
printf("\nDieses Tool berechnet die IBAN anhand von Kontonummer und Bankleitzahl, alternativ pr\201ft es ob eine IBAN korrekt ist.\n");
int modus = modusWahl();
switch (modus)
{
case 1:
{
IBANcalc();
break;
}
case 2:
{
IBANval();
break;
}
default:
{
header();
printf("\nOperation Abgebrochen\n\n");
return -1;
}
}
}
| 20.844444 | 140 | 0.491471 |
d8d3b2262de53475f1efcd81dca34b0f692ba7e2 | 1,030 | h | C | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APShareGIFObject.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | 5 | 2020-03-29T12:08:37.000Z | 2021-05-26T05:20:11.000Z | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APShareGIFObject.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | null | null | null | AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/APShareGIFObject.h | ceekay1991/AliPayForDebug | 5795e5db31e5b649d4758469b752585e63e84d94 | [
"MIT"
] | 5 | 2020-04-17T03:24:04.000Z | 2022-03-30T05:42:17.000Z | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@class NSData, NSString;
@interface APShareGIFObject : NSObject
{
NSData *_imageData;
NSString *_imageUrl;
NSString *_emotionId;
NSString *_firstFrameId;
long long _gifSize;
NSString *_extend;
}
@property(retain, nonatomic) NSString *extend; // @synthesize extend=_extend;
@property(nonatomic) long long gifSize; // @synthesize gifSize=_gifSize;
@property(retain, nonatomic) NSString *firstFrameId; // @synthesize firstFrameId=_firstFrameId;
@property(retain, nonatomic) NSString *emotionId; // @synthesize emotionId=_emotionId;
@property(retain, nonatomic) NSString *imageUrl; // @synthesize imageUrl=_imageUrl;
@property(retain, nonatomic) NSData *imageData; // @synthesize imageData=_imageData;
- (void).cxx_destruct;
- (void)encodeWithCoder:(id)arg1;
- (id)initWithCoder:(id)arg1;
@end
| 31.212121 | 95 | 0.733981 |
d8d46c5813f0192050861f50f3616b6a0b2f6a51 | 564 | h | C | Source/ELNTestUtils.h | elegion/ios-ELNTestUtils | 7a01debba563ed169848c1bb387ab0078731ba11 | [
"MIT"
] | null | null | null | Source/ELNTestUtils.h | elegion/ios-ELNTestUtils | 7a01debba563ed169848c1bb387ab0078731ba11 | [
"MIT"
] | null | null | null | Source/ELNTestUtils.h | elegion/ios-ELNTestUtils | 7a01debba563ed169848c1bb387ab0078731ba11 | [
"MIT"
] | null | null | null | //
// ELNTestUtils.h
// ELNTestUtils
//
// Created by Ilya Kulebyakin on 28/04/16.
// Copyright © 2016 e-legion. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ELNTestUtils.
FOUNDATION_EXPORT double ELNTestUtilsVersionNumber;
//! Project version string for ELNTestUtils.
FOUNDATION_EXPORT const unsigned char ELNTestUtilsVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ELNTestUtils/PublicHeader.h>
#import <ELNTestUtils/XCTestCase+ELNHelpers.h>
| 28.2 | 137 | 0.774823 |
d8d58e07d4429248e237d9c824f332dd21ff3782 | 860 | h | C | Ray.h | maxbla/RayTracer | 47660929bc8047a961aee96a6a01705a817ee090 | [
"Apache-2.0"
] | null | null | null | Ray.h | maxbla/RayTracer | 47660929bc8047a961aee96a6a01705a817ee090 | [
"Apache-2.0"
] | null | null | null | Ray.h | maxbla/RayTracer | 47660929bc8047a961aee96a6a01705a817ee090 | [
"Apache-2.0"
] | null | null | null | #include "Eigen/Dense"
#include <vector>
#include <algorithm>
#include "SimpleImage.h"
class Ray {
public:
double start;
double end;
Eigen::Vector4d e;
Eigen::Vector4d d;
static void normalize(Ray &r) {
//double factor = sqrt(pow(r.d[0],2)+pow(r.d[1],2)+pow(r.d[2],2)+pow(r.d[3],2));
//r.d/= factor;
r.d.normalize();
}
void normalize() {
Ray::normalize(*this);
}
Ray(double _start, double _end, Eigen::Vector4d _e, Eigen::Vector4d _d) {
start = _start;
end = _end;
e = _e;
d = _d;
normalize();
}
Ray() {
start = 0.0;
end = 1.0;
e=Eigen::Vector4d(0,0,0,0);
d=Eigen::Vector4d(0,0,1.0,0);
}
bool isInRange(double t) {
if (start<=t && t<=end) {
return true;
}
else {
return false;
}
}
Eigen::Vector4d pointAt(double t) {
return e+t*d;
}
};
| 16.538462 | 84 | 0.552326 |
d8d6ab79685b057f665a1b6c5af0e7d7c6718acc | 2,145 | h | C | omnet_system/SS-5G/src/ue/NrSrsUe.h | mingpz2010/PhysicsThinker | adb0bc4296489df949ea2f0d26b4344abffbb740 | [
"MIT"
] | 1 | 2021-07-30T05:43:23.000Z | 2021-07-30T05:43:23.000Z | omnet_system/SS-5G/src/ue/NrSrsUe.h | mingpz2010/PhysicsThinker | adb0bc4296489df949ea2f0d26b4344abffbb740 | [
"MIT"
] | null | null | null | omnet_system/SS-5G/src/ue/NrSrsUe.h | mingpz2010/PhysicsThinker | adb0bc4296489df949ea2f0d26b4344abffbb740 | [
"MIT"
] | 1 | 2021-09-23T05:10:05.000Z | 2021-09-23T05:10:05.000Z | // MIT License
//
// Copyright (c) 2021 PingzhouMing
//
// 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 UE_NRSRSUE_H_
#define UE_NRSRSUE_H_
#include <stdio.h>
#include <string.h>
#include <omnetpp.h>
#include <vector>
#include "../message/airframe_m.h"
#include "../message/bscontrol_m.h"
#include "../NrEntity.h"
#include "../signals/complex_t.h"
#include "../signals/Dimscal.h"
#include "NrUeBase.h"
namespace ss5G {
using namespace omnetpp;
class NrSrsUe : public NrUeBase
{
private:
int channel_model;
double ue2bs_dist[4];
int bs_connected;
cMessage *srs_control_event;
SrsPdu_t srs_config;
int num_rb;
int num_srs_re;
int k0;
int cs_max;
int num_re_total;
int tx_ants;
// External data file of the transmit grid
std::string tx_grid_name;
protected:
virtual ~NrSrsUe();
virtual void initialize();
virtual void handleMessage(cMessage *msg);
void srs_pdu_initialize();
void srs_freq_position_calc();
void update_positions();
virtual void srsPeriodForward();
bool check_state();
};
};
#endif /* UE_NRSRSUE_H_ */
| 28.6 | 81 | 0.729138 |
d8d72b8632f41c536eab05ac5e9eec29981058f5 | 1,338 | h | C | ZHLNetWork/Classes/Plug/THHTTPPlugProtocol.h | Tang-Hai/ZHLNetWork | 641e0ac6bcb024d36bfc2cf11a9a9b4593af12e4 | [
"MIT"
] | null | null | null | ZHLNetWork/Classes/Plug/THHTTPPlugProtocol.h | Tang-Hai/ZHLNetWork | 641e0ac6bcb024d36bfc2cf11a9a9b4593af12e4 | [
"MIT"
] | null | null | null | ZHLNetWork/Classes/Plug/THHTTPPlugProtocol.h | Tang-Hai/ZHLNetWork | 641e0ac6bcb024d36bfc2cf11a9a9b4593af12e4 | [
"MIT"
] | null | null | null | //
// THHTTPPlugProtocol.h
// 我的网络层_IOS
//
// Created by MAC on 2020/9/11.
// Copyright © 2020 唐海. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "THRequestProtocol.h"
NS_ASSUME_NONNULL_BEGIN
typedef NSInteger THHTTPPlugPriority;
static THHTTPPlugPriority THHTTPPlugLowPriority = 250;
static THHTTPPlugPriority THHTTPPlugMediumPriority = 750;
static THHTTPPlugPriority THHTTPPlugHighPriority = 1000;
@protocol THHTTPPlugProtocol <NSObject>
/// 插件执行优先级
- (THHTTPPlugPriority)priority;
@optional
/// 将要开始请求 可以在这里修改请求数据
- (void)willStartWithRequest:(id<THRequestProtocol>)request;
//// 即将开始请求 可以在这里修改 URLRequest
- (NSURLRequest *)startWithRequest:(NSMutableURLRequest *)request;
/// 结果已返回整个流程将要结束 可以对 responseObject 做处理 并返回
- (id)willDidWithResponse:(NSURLResponse *)response responseObject:(id)responseObject error:(NSError *)error;
/// 上传实时进度
- (void)uploadProgress:(NSProgress *)uploadProgress;
/// 下载实时进度
- (void)downloadProgress:(NSProgress *)downloadProgress;
#pragma mark - Data Dowload
/// 下载目录修改
- (NSURL *)changeDowloadWithTargetPath:(NSURL *)targetPath response:(NSURLResponse *)response;
/// 结果已返回整个流程将要结束 可以对 filePath 做处理 并返回
- (NSURL *)willDowloadDidWithResponse:(NSURLResponse * _Nullable)response filePath:(NSURL * _Nullable)filePath error:(NSError * _Nullable)error;
@end
NS_ASSUME_NONNULL_END
| 31.116279 | 144 | 0.789238 |
d8d77954ee0b116375d192c69e810737c09360c2 | 1,783 | h | C | src/tower.h | commandblockguy/reverse-tower-defense | 247a58b2b6dc4c2616cb629bbb957a2748212d66 | [
"MIT"
] | 2 | 2019-04-14T23:12:07.000Z | 2019-04-17T00:04:45.000Z | src/tower.h | commandblockguy/reverse-tower-defense | 247a58b2b6dc4c2616cb629bbb957a2748212d66 | [
"MIT"
] | null | null | null | src/tower.h | commandblockguy/reverse-tower-defense | 247a58b2b6dc4c2616cb629bbb957a2748212d66 | [
"MIT"
] | 1 | 2020-03-09T13:21:19.000Z | 2020-03-09T13:21:19.000Z | #ifndef H_TOWER
#define H_TOWER
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "enemy.h"
#define NUM_TOWERS 12
#define TOWER_RADIUS 8
enum {
NONE = -1,
STANDARD = 0,
SNIPER,
BURST,
MAGE // may not implement this one, idk
};
typedef uint8_t archetype_t;
enum {
FIRST = 0,
LAST,
STRONG,
WEAK,
ARBITRARY
};
typedef uint8_t target_t;
typedef struct {
uint24_t posX;
uint8_t posY;
uint8_t numRanges; // Number of elements in ranges
struct pathRange *ranges;
uint24_t xp; // Used to calculate the level of the tower
uint8_t spentLevels; // Number of levels which have been used up already
archetype_t archetype; // Basic tower type
target_t targetType;
uint8_t upgrades[3]; // Upgrades
uint24_t damage;
uint24_t range;
uint24_t maxCooldown; // Number that cooldown is set to on firing
uint8_t cooldown; // Amount of time between shots
uint8_t animTime; // Reset to 0 each time an animation is started, increments by 1 each tick
uint24_t targetX; // Where to point lasers
uint8_t targetY;
} tower_t;
typedef struct {
char* name;
char* description;
} upgradeData_t;
void initTowers(void);
void calcTowerStats(tower_t *tower);
void calcTowerRanges(tower_t *tower);
void attemptShot(tower_t *tower);
void towerDamageEnemy(tower_t *tower, enemy_t *enemy);
uint24_t levelToXP(uint8_t level);
uint8_t xpToLevel(uint24_t xp);
extern tower_t towers[NUM_TOWERS];
extern char *archNames[];
extern char *tgtNames[];
extern const upgradeData_t upgradeData[3][3][4];
extern const uint24_t baseStats[3][3];
extern const uint24_t statMultipliers[3][2];
#endif | 22.012346 | 96 | 0.711722 |
d8d9759250809f50e76bfe21f5ad4e64d2dca399 | 131 | h | C | src/IsArduboy.h | Pharap/MillipeForPokitto | 95892f035dbac34fac2ff19b235a946665c3d4f7 | [
"MIT"
] | null | null | null | src/IsArduboy.h | Pharap/MillipeForPokitto | 95892f035dbac34fac2ff19b235a946665c3d4f7 | [
"MIT"
] | null | null | null | src/IsArduboy.h | Pharap/MillipeForPokitto | 95892f035dbac34fac2ff19b235a946665c3d4f7 | [
"MIT"
] | null | null | null | #pragma once
#if (defined(ARDUBOY_10) || defined(AB_DEVKIT))
#define IS_ARDUBOY true
#else
#define IS_ARDUBOY false
#endif | 18.714286 | 48 | 0.725191 |
d8df045650ceeb2529ab057a8dea862e5ae60679 | 395 | h | C | headers/windows/dialogwindow.h | alexeipolovin/Barybians-Desktop-Client | a9c31d5c4f557af1791dd84b326239e03816593d | [
"MIT"
] | 4 | 2020-11-05T10:43:53.000Z | 2022-02-23T09:26:25.000Z | headers/windows/dialogwindow.h | alexeipolovin/Barybians-Desktop-Client | a9c31d5c4f557af1791dd84b326239e03816593d | [
"MIT"
] | null | null | null | headers/windows/dialogwindow.h | alexeipolovin/Barybians-Desktop-Client | a9c31d5c4f557af1791dd84b326239e03816593d | [
"MIT"
] | null | null | null | //
// Created by Kernux on 13.06.2021.
//
#ifndef BARYBIANS_DESKTOP_CLIENT_DIALOGWINDOW_H
#define BARYBIANS_DESKTOP_CLIENT_DIALOGWINDOW_H
#include <QWidget>
#include <QMainWindow>
#include "headers/webconnector.h"
class DialogWindow : public QWidget {
~DialogWindow();
public:
DialogWindow(WebConnector *webConnector, int id);
};
#endif //BARYBIANS_DESKTOP_CLIENT_DIALOGWINDOW_H
| 17.173913 | 53 | 0.777215 |
d8e0988584f536b6a5e4ebc70781ac4f2c890abb | 2,832 | h | C | SDK/XTime.h | Xilinx/SDKOpenGLES | ca2b9574271fabe3f96fb1423871f69ba8210714 | [
"BSD-3-Clause"
] | 7 | 2020-02-12T15:31:27.000Z | 2021-04-28T06:38:17.000Z | SDK/XTime.h | Xilinx/SDKOpenGLES | ca2b9574271fabe3f96fb1423871f69ba8210714 | [
"BSD-3-Clause"
] | 3 | 2019-03-25T12:54:51.000Z | 2022-03-16T09:35:36.000Z | SDK/XTime.h | Xilinx/SDKOpenGLES | ca2b9574271fabe3f96fb1423871f69ba8210714 | [
"BSD-3-Clause"
] | 8 | 2019-03-04T23:20:39.000Z | 2021-02-15T17:13:41.000Z | /*******************************************************************************
*
* Copyright (C) 2017 Xilinx, Inc. All rights reserved.
*
* 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.
*
* Use of the Software is limited solely to applications:
* (a) running on a Xilinx device, or
* (b) that interact with a Xilinx device through a bus or interconnect.
*
* 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
* XILINX CONSORTIUM 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.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in
* this Software without prior written authorization from Xilinx.
*
*******************************************************************************/
/******************************************************************************/
/**
*
* @file Xtime.h
*
* This file implements timer related API for SDK
*
* @note None.
*
* <pre>
* MODIFICATION HISTORY:
*
* Ver Who Date Changes
* ----- ---- -------- -----------------------------------------------
* 1.0 Alok G 10/06/17 Initial release.
* </pre>
*
*******************************************************************************/
/******************************* Source Files ********************************/
#ifndef TIMER_H
#define TIMER_H
#include <cstdio>
#if defined(_WIN32)
#else
#include <sys/time.h>
#endif
namespace SDKXilinx
{
class Timer
{
private:
int frameCount;
float fps;
float lastTime;
timeval startTime;
timeval currentTime;
float lastIntervalTime;
float fpsTime;
public:
Timer();
void reset();
float getTime();
float getInterval();
float getFPS();
bool isTimePassed(float seconds = 1.0f);
};
#endif /* TIMER_H */
}
| 32.551724 | 87 | 0.568503 |
d8e0ccf93763c42b674b9cf1d73f707c8e7bfac6 | 6,052 | h | C | xdk-asf-3.51.0/common/services/isp/flip/isp.h | j3270/SAMD_Experiments | 5c242aff44fc8d7092322d7baf2dda450a78a9b7 | [
"MIT"
] | null | null | null | xdk-asf-3.51.0/common/services/isp/flip/isp.h | j3270/SAMD_Experiments | 5c242aff44fc8d7092322d7baf2dda450a78a9b7 | [
"MIT"
] | null | null | null | xdk-asf-3.51.0/common/services/isp/flip/isp.h | j3270/SAMD_Experiments | 5c242aff44fc8d7092322d7baf2dda450a78a9b7 | [
"MIT"
] | null | null | null | /**
* \file
*
* \brief In System Programming API
*
* Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
*
* \asf_license_start
*
* \page License
*
* Subject to your compliance with these terms, you may use Microchip
* software and any derivatives exclusively with Microchip products.
* It is your responsibility to comply with third party license terms applicable
* to your use of third party software (including open source software) that
* may accompany Microchip software.
*
* THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
* WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
* INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
* AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
* LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
* LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
* SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
* POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
* ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
* RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
* THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
*
* \asf_license_stop
*
*/
/*
* Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
*/
#ifndef _ISP_H_
#define _ISP_H_
#include "conf_isp.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* \defgroup isp In System Programming API
*
* @{
*/
/**
* \name Main In System Programming functions
* @{
*/
/**
* \brief Initializes the ISP interface
*
* Example, load the JTAG ID in signature memory
*/
void isp_init(void);
/**
* \brief Gives the security state of the chip
*
* \return \c 1 if chip is secured, otherwise \c 0.
*/
bool isp_is_security(void);
/**
* \brief Change the boot process configuration
* to enable/disable the ISP mode for the next startup.
*
* \param force Enable the ISP mode for the next startup if true
*/
void isp_force_boot_isp(bool force);
/**
* \brief Erase the application flash area and eventually the eeprom
*
* \return \c 1 if function was successfully done, otherwise \c 0.
*/
bool isp_erase_chip(void);
/**
* \brief Erase a part of the application flash area
* This function must be called again as long as it returns 0.
*
* \return \c 1 if the whole application flash area is erased, otherwise it is
* not finished.
*
* This function has been created to split a long erase so that
* the ISP application is able to answer external pending requests.
*/
bool isp_erase_chip_split(void);
/**
* \brief Resets the device to start the user application
*
* The ISP mode must be disabled before (See isp_force_boot_isp(false))
* to allow the boot process to jump to the user application.
*
* \note: this function is usually implemented by using a watchdog reset
* or a software reset to restart the CPU.
*/
void isp_start_appli(void);
//! @}
//! Data type for holding flash memory addresses
#ifdef ISP_SMALL_MEMORY_SIZE
typedef uint16_t isp_addr_t;
#else
typedef uint32_t isp_addr_t;
#endif
//! Memory API definition
typedef struct {
//! Size of the memory (unit Byte)
uint32_t size;
//! Function to read memory
void (*fnct_read) (void *dst, isp_addr_t src, uint16_t nbytes);
//! Function to write memory
void (*fnct_write) (isp_addr_t dst, const void *src, uint16_t nbytes);
} isp_mem_t;
/**
* \name Memory units index values
* Used to access at a memory through \ref isp_memories list.
* @{
*/
#define ISP_MEM_FLASH 0x00
#define ISP_MEM_EEPROM 0x01
#define ISP_MEM_SECURITY 0x02
#define ISP_MEM_CONFIGURATION 0x03
#define ISP_MEM_BOOTLOADER 0x04
#define ISP_MEM_SIGNATURE 0x05
#define ISP_MEM_USER 0x06
#define ISP_MEM_INT_RAM 0x07
#define ISP_MEM_EXT_MEM_CS0 0x08
#define ISP_MEM_EXT_MEM_CS1 0x09
#define ISP_MEM_EXT_MEM_CS2 0x0A
#define ISP_MEM_EXT_MEM_CS3 0x0B
#define ISP_MEM_EXT_MEM_CS4 0x0C
#define ISP_MEM_EXT_MEM_CS5 0x0D
#define ISP_MEM_EXT_MEM_CS6 0x0E
#define ISP_MEM_EXT_MEM_CS7 0x0F
#define ISP_MEM_EXT_MEM_DF 0x10
#define ISP_MEM_COUNT 0x11 // Number of memory units
//! @}
//! Memories list structure
typedef union {
isp_mem_t const *mem[ISP_MEM_COUNT];
struct {
isp_mem_t const *flash;
isp_mem_t const *eeprom;
isp_mem_t const *security;
isp_mem_t const *conf;
isp_mem_t const *bootloader;
isp_mem_t const *signature;
isp_mem_t const *user;
isp_mem_t const *int_ram;
isp_mem_t const *ext_mem_cs0;
isp_mem_t const *ext_mem_cs1;
isp_mem_t const *ext_mem_cs2;
isp_mem_t const *ext_mem_cs3;
isp_mem_t const *ext_mem_cs4;
isp_mem_t const *ext_mem_cs5;
isp_mem_t const *ext_mem_cs6;
isp_mem_t const *ext_mem_cs7;
isp_mem_t const *ext_mem_df;
}list;
} isp_mems_t;
//! Memories list declaration
extern const isp_mems_t isp_memories;
COMPILER_PACK_SET(1) // alignment requested to simulate a memory
//! Memory signature structure to store JTAG ID
typedef union {
uint8_t mem[4];
struct {
uint8_t manufacture;
uint8_t product_number_msb;
uint8_t product_number_lsb;
uint8_t product_revision;
};
} isp_mem_signature_t;
/**
* Memory bootloader structure
*
* In the FLIP protocol, this structure is used to store medium
* and minor bootloader versions:
* - Example, Version 0x00 give 1.0.0 on batchisp log
* - Example, Version 0x03 give 1.0.3 on batchisp log
* - Example, Version 0x25 give 1.2.5 on batchisp log
* - id1 & id2 are not used and must always be 0.
*/
typedef struct {
uint8_t version;
uint8_t id1;
uint8_t id2;
} isp_mem_bootloader_t;
COMPILER_PACK_RESET()
//! @}
#ifdef __cplusplus
}
#endif
#endif // _ISP_H_
| 27.509091 | 92 | 0.703073 |
d8e2dfd21bcb00c1a66e7f48a4c772a95251d5e6 | 2,209 | h | C | amethyst/include/sfa/gx/gx.h | knight-ryu12/StarFoxAdventures | 83648dabda9777d7de5da1bf9b83ddb82d7dd2a0 | [
"MIT"
] | 22 | 2019-11-29T21:20:59.000Z | 2022-01-25T06:39:02.000Z | amethyst/include/sfa/gx/gx.h | knight-ryu12/StarFoxAdventures | 83648dabda9777d7de5da1bf9b83ddb82d7dd2a0 | [
"MIT"
] | 7 | 2021-01-26T11:57:25.000Z | 2022-02-07T11:00:06.000Z | amethyst/include/sfa/gx/gx.h | knight-ryu12/StarFoxAdventures | 83648dabda9777d7de5da1bf9b83ddb82d7dd2a0 | [
"MIT"
] | 3 | 2021-01-03T23:47:37.000Z | 2021-08-06T09:02:11.000Z | #define GX_FIFO_BASE 0xCC008000 //XXX is this really not part of SDK?
typedef struct {
union {
struct { u8 r; u8 g; u8 b; u8 a; };
u32 value;
};
} Color4b;
typedef enum { //type:u32
VcdHiMask_TEX0 = 0x3,
VcdHiMask_TEX1 = 0xC,
VcdHiMask_TEX2 = 0x30,
VcdHiMask_TEX3 = 0xC0,
VcdHiMask_TEX4 = 0x300,
VcdHiMask_TEX5 = 0xC00,
VcdHiMask_TEX6 = 0x3000,
VcdHiMask_TEX7 = 0xC000,
} VcdHiMask;
typedef enum { //type:u32
VcdLoMask_PMIDX = 0x1,
VcdLoMask_T0MIDX = 0x2,
VcdLoMask_T1MIDX = 0x4,
VcdLoMask_T2MIDX = 0x8,
VcdLoMask_T3MIDX = 0x10,
VcdLoMask_T4MIDX = 0x20,
VcdLoMask_T5MIDX = 0x40,
VcdLoMask_T6MIDX = 0x80,
VcdLoMask_T7MIDX = 0x100,
VcdLoMask_POS0 = 0x200,
VcdLoMask_POS1 = 0x400,
VcdLoMask_POS = 0x600,
VcdLoMask_NRM0 = 0x800,
VcdLoMask_NRM1 = 0x1000,
VcdLoMask_NRM = 0x1800,
VcdLoMask_COL00 = 0x2000,
VcdLoMask_COL01 = 0x4000,
VcdLoMask_COL0 = 0x6000,
VcdLoMask_COL10 = 0x8000,
VcdLoMask_COL11 = 0x10000,
VcdLoMask_COL1 = 0x18000,
} VcdLoMask;
typedef enum {
RenderFlag_IsNotSubmap = 0x1,
RenderFlag_EnableMapUpdate = 0x2,
RenderFlag_Widescreen = 0x8,
RenderFlag_Cloudy = 0x10,
RenderFlag_DrawLights = 0x40,
RenderFlag_DrawShadows = 0x80,
RenderFlag_PendingMapLoad = 0x1000,
RenderFlag_ChangeMapLayer = 0x4000,
RenderFlag_ChangeDrawDistance_10000 = 0x10000,
RenderFlag_Overcast = 0x40000,
} RenderFlags;
typedef struct {
void *cmdBuf; //commands to execute
void *unk04; //always NULL?
void *frameBuf; //frame buffer to render into
} GxPendingFrame;
typedef struct {
short nPending; //number of pending frames
short queueSize; //max pending frames
short entrySize; //sizeof(GxPendingFrame)
u8 unk06;
u8 unk07;
short next; //idx of next queue entry to write
u8 unk0A;
u8 unk0B;
GxPendingFrame *frame;
} GxFrameQueue;
extern GxFrameQueue gxFrameQueue;
| 28.688312 | 69 | 0.619737 |
d8e37589fbfd11eefa15cb81634e9d8b081798ce | 1,023 | c | C | src/kernel/fs/smemfs/power_graphic_2/inode/walk.c | Paquity/Vhex-kernel | 94c6fb27e881c855bdc82d98394de2f9727466ef | [
"CC0-1.0"
] | 3 | 2021-01-14T15:24:30.000Z | 2021-11-29T18:48:21.000Z | src/kernel/fs/smemfs/power_graphic_2/inode/walk.c | Paquity/Vhex-kernel | 94c6fb27e881c855bdc82d98394de2f9727466ef | [
"CC0-1.0"
] | null | null | null | src/kernel/fs/smemfs/power_graphic_2/inode/walk.c | Paquity/Vhex-kernel | 94c6fb27e881c855bdc82d98394de2f9727466ef | [
"CC0-1.0"
] | 1 | 2020-10-12T14:28:45.000Z | 2020-10-12T14:28:45.000Z | #include <kernel/fs/smemfs.h>
/* smemfs_walk() - Find inode based on directory ID and flags */
/* @note: This function is internal of smemFS, do not call it ! */
smemfs_inode_t *smemfs_USB2_walk(smemfs_inode_t *current,
smemfs_inode_t *file, uint16_t folder_id, int flags)
{
smemfs_fragdata_t *fragdata;
// Check current inode validity.
if (file == NULL)
return (NULL);
// Walk file
while (file->info == CASIO_SMEM_HEADER_INFO_EXIST ||
file->info == CASIO_SMEM_HEADER_INFO_DELETE)
{
// New inode validity check.
if (file != current &&
file->info == CASIO_SMEM_HEADER_INFO_EXIST &&
(((flags & WALK_FLAG_ID_CHECK_PARENT) != 0 && file->parent.id == folder_id) ||
((flags & WALK_FLAG_ID_CHECK_PARENT) == 0 && file->id == folder_id)))
{
return (file);
}
// Fast fragmentation skip
fragdata = (void *)&file[1];
if (fragdata->magic == CASIO_SMEM_FRAGMENT_MAGIC)
fragdata = &fragdata[fragdata->frag_total];
// Update current inode
file = (void*)fragdata;
}
return (NULL);
}
| 27.648649 | 81 | 0.681329 |
d8e4dcf6534ca3ddbb0d666b246009631c6aa5e8 | 11,697 | h | C | alljoyn_java/jni/JBusAttachment.h | liuxiang88/core-alljoyn | 549c966482d9b89da84aa528117584e7049916cb | [
"Apache-2.0"
] | 33 | 2018-01-12T00:37:43.000Z | 2022-03-24T02:31:36.000Z | alljoyn_java/jni/JBusAttachment.h | liuxiang88/core-alljoyn | 549c966482d9b89da84aa528117584e7049916cb | [
"Apache-2.0"
] | 1 | 2020-01-05T05:51:27.000Z | 2020-01-05T05:51:27.000Z | alljoyn_java/jni/JBusAttachment.h | liuxiang88/core-alljoyn | 549c966482d9b89da84aa528117584e7049916cb | [
"Apache-2.0"
] | 30 | 2017-12-13T23:24:00.000Z | 2022-01-25T02:11:19.000Z | /******************************************************************************
* Copyright (c) Open Connectivity Foundation (OCF), AllJoyn Open Source
* Project (AJOSP) Contributors and others.
*
* SPDX-License-Identifier: Apache-2.0
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution, and is available at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Copyright (c) Open Connectivity Foundation and Contributors to AllSeen
* Alliance. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
******************************************************************************/
#ifndef _ALLJOYN_JBUSATTACHMENT_H
#define _ALLJOYN_JBUSATTACHMENT_H
#include <jni.h>
#include <map>
#include <algorithm>
#include <list>
#include <utility>
#include <vector>
#include <qcc/Mutex.h>
#include <qcc/atomic.h>
#include <alljoyn/BusAttachment.h>
#include <alljoyn/AutoPinger.h>
#include <alljoyn/PingListener.h>
#include <alljoyn/DBusStd.h>
#include "JAuthListener.h"
#include "JPermissionConfigurationListener.h"
#include "JApplicationStateListener.h"
#include "JKeyStoreListener.h"
#include "JSignalHandler.h"
#include "JAboutObject.h"
#include "PendingAsyncJoin.h"
#include "PendingAsyncPing.h"
class JAuthListener;
class JApplicationStateListener;
class JKeyStoreListener;
class JSignalHandler;
class JAboutObject;
class PendingAsyncJoin;
class PendingAsyncPing;
/**
* The C++ class that backs the Java BusAttachment class and provides the
* plumbing connection from AllJoyn out to Java-land.
*/
class JBusAttachment : public ajn::BusAttachment {
public:
JBusAttachment(const char* applicationName, bool allowRemoteMessages, int concurrency);
QStatus Connect(const char* connectArgs, jobject jkeyStoreListener, const char* authMechanisms,
jobject jauthListener, const char* keyStoreFileName, jboolean isShared);
void Disconnect();
QStatus EnablePeerSecurity(const char* authMechanisms, jobject jauthListener, const char* keyStoreFileName, jboolean isShared, JPermissionConfigurationListener* jpcl = NULL);
QStatus RegisterBusObject(const char* objPath, jobject jbusObject, jobjectArray jbusInterfaces,
jboolean jsecure, jstring jlangTag, jstring jdesc, jobject jtranslator);
void UnregisterBusObject(jobject jbusObject);
template <typename T>
QStatus RegisterSignalHandler(const char* ifaceName, const char* signalName,
jobject jsignalHandler, jobject jmethod, const char* ancillary);
void UnregisterSignalHandler(jobject jsignalHandler, jobject jmethod);
bool IsLocalBusObject(jobject jbusObject);
void ForgetLocalBusObject(jobject jbusObject);
/**
* A mutex to serialize access to bus attachment critical sections. It
* doesn't seem worthwhile to have any finer granularity than this. Note
* that this member is public since we trust that the native binding we
* wrote will use it correctly.
*/
qcc::Mutex baCommonLock;
/**
* A mutex to serialize method call, property, etc., access in any attached
* ProxyBusObject. This is a blunt instrument, but support for
* multi-threading on client and service sides has not been completely
* implemented, so we simply disallow it for now.
*/
qcc::Mutex baProxyLock;
/**
* A vector of all of the C++ "halves" of the signal handler objects
* associated with this bus attachment. Note that this member is public
* since we trust that the native binding we wrote will use it correctly.
*/
std::vector<std::pair<jobject, JSignalHandler*> > signalHandlers;
/*
* The single (optional) JPermissionConfigurationListener associated with this bus
* attachment. Note that this member is public since we trust that the native binding
* we wrote will use it correctly.
*/
JPermissionConfigurationListener* jPermissionConfigurationListener;
/**
* A mutex to serialize access to bus attachment jApplicationStateListeners
*/
qcc::Mutex baAppStateListenLock;
/**
* A vector of all of the JApplicationStateListeners
*/
std::vector<JApplicationStateListener*> jApplicationStateListeners;
/*
* The single (optionsl) KeyStoreListener associated with this bus
* attachment. The KeyStoreListener and AuthListener work together to deal
* with security exchanges over secure interfaces. Note that this member is
* public since we trust that the native binding we wrote will usse it
* correctly. When keyStoreListener is set, there must be a corresponding
* strong reference to the associated Java Object set in
* jkeyStoreListenerRef.
*/
JKeyStoreListener* keyStoreListener;
/**
* A JNI strong global reference to The single (optional) Java KeyStoreListener
* that has been associated with this bus attachment. When jkeystoreListenerRef is
* set, there must be a corresponding object pointer to an associated
* C++ backing object set in keyStoreListener.
*/
jobject jkeyStoreListenerRef;
/**
* The single (optional) C++ backing class for a provided AuthListener that
* has been associated with this bus attachment. The KeyStoreListener and
* AuthListener work together to deal with security exchanges over secure
* interfaces. Note that this member is public since we trust that the
* native binding we wrote will use it correctly. When authListener is
* set, there must be a corresponding strong reference to the associated
* Java Object set in jauthListenerRef.
*/
JAuthListener* authListener;
/**
* The single (optional) C++ backing class for JAboutObject. The aboutObj
* contain a global ref jaboutObjGlobalRef that must be cleared when the
* BusAttachment is disconnected.
*/
JAboutObject* aboutObj;
/**
* A JNI strong global reference to The single (optional) Java AuthListener
* that has been associated with this bus attachment. When jauthListenerRef is
* set, there must be a corresponding object pointer to an associated
* C++ backing object set in authListener.
*/
jobject jauthListenerRef;
/**
* A dedicated mutex to serialize access to the authListener,
* authListenerRef, keyStoreListener and keyStoreListenerRef. This is
* required since we can't hold the common lock during callouts to Alljoyn
* that may result in callins. This describes the authentication process.
* In order to prevent users from calling in right in the middle of an
* authentication session and changing the authentication listeners out
* from under us, we dedicate a lock that must be taken in order to make
* a change. This lock is held during the authentication process and during
* the change process.
*/
qcc::Mutex baAuthenticationChangeLock;
/**
* A list of strong references to Java bus listener objects.
*
* If clients use the unnamed parameter / unnamed class idiom to provide bus
* listeners to registerBusListener, they can forget that the listeners
* exist after the register call and never explicitly call unregister.
*
* Since we need these Java objects around, we need to hold a strong
* reference to them to keep them from being garbage collected.
*
* Note that this member is public since we trust that the native binding we
* wrote will use it correctly.
*/
std::list<jobject> busListeners;
/**
* A list of strong references to Java translator objects.
*
* If clients use the unnamed parameter / unnamed class idiom to provide bus
* listeners to setDescriptionTranslator, they can forget that the listeners
* exist after the register call and never explicitly call unregister.
*
* Since we need these Java objects around, we need to hold a strong
* reference to them to keep them from being garbage collected.
*
* Note that this member is public since we trust that the native binding we
* wrote will usse it correctly.
*/
std::list<jobject> translators;
/**
* A list of strong references to Java Bus Objects we use to indicate that
* we have a part ownership in a given object. Used during destruction.
*
*/
std::list<jobject> busObjects;
/**
* A map from session ports to their associated Java session port listeners.
*
* This mapping must be on a per-bus attachment basis since the scope of the
* uniqueness of a session port is per-bus attachment
*
* Note that this member is public since we trust that the native binding we
* wrote will usse it correctly.
*/
std::map<ajn::SessionPort, jobject> sessionPortListenerMap;
typedef struct {
jobject jhostedListener;
jobject jjoinedListener;
jobject jListener;
}BusAttachmentSessionListeners;
/**
* A map from sessions to their associated Java session listeners.
*
* This mapping must be on a per-bus attachment basis since the uniqueness of a
* session is per-bus attachment.
*
* Note that this member is public since we trust that the native binding we
* wrote will usse it correctly.
*/
std::map<ajn::SessionId, BusAttachmentSessionListeners> sessionListenerMap;
/**
* A List of pending asynchronous join operation informations. We store
* Java object references here while AllJoyn mulls over what it can do about
* the operation. Note that this member is public since we trust that the
* native binding we wrote will use it correctly.
*/
std::list<PendingAsyncJoin*> pendingAsyncJoins;
/**
* A List of pending asynchronous ping operation informations. We store
* Java object references here while AllJoyn mulls over what it can do about
* the operation. Note that this member is public since we trust that the
* native binding we wrote will use it correctly.
*/
std::list<PendingAsyncPing*> pendingAsyncPings;
int32_t IncRef(void)
{
return qcc::IncrementAndFetch(&refCount);
}
int32_t DecRef(void)
{
int32_t refs = qcc::DecrementAndFetch(&refCount);
if (refs == 0) {
delete this;
}
return refs;
}
int32_t GetRef(void)
{
return refCount;
}
private:
JBusAttachment(const JBusAttachment& other);
JBusAttachment& operator =(const JBusAttachment& other);
/*
* An intrusive reference count
*/
volatile int32_t refCount;
/*
* Destructor is marked private since it should only be called from DecRef.
*/
virtual ~JBusAttachment();
};
#endif
| 38.60396 | 178 | 0.699154 |
d8e4e635af103b50b6b915d73d2beedadf215d82 | 293 | h | C | netbsd/sys/arch/arc/include/types.h | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 91 | 2015-01-05T15:18:31.000Z | 2022-03-11T16:43:28.000Z | netbsd/sys/arch/arc/include/types.h | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 1 | 2016-02-25T15:57:55.000Z | 2016-02-25T16:01:02.000Z | netbsd/sys/arch/arc/include/types.h | MarginC/kame | 2ef74fe29e4cca9b4a87a1d5041191a9e2e8be30 | [
"BSD-3-Clause"
] | 21 | 2015-02-07T08:23:07.000Z | 2021-12-14T06:01:49.000Z | /* $NetBSD: types.h,v 1.9 2000/06/17 07:23:05 soda Exp $ */
/* $OpenBSD: types.h,v 1.2 1997/04/19 17:19:59 pefo Exp $ */
/* NetBSD: types.h,v 1.10 1995/07/06 03:39:43 cgd Exp */
#define _MIPS_PADDR_T_64BIT
#include <mips/types.h>
#define __HAVE_NWSCONS
#define __BROKEN_CONFIG_UNIT_USAGE
| 24.416667 | 60 | 0.692833 |
d8e60f3b51f19c92e5de3b388ed4e9de03914463 | 3,678 | c | C | cpu/test_fwht.c | andres091096/fwht | fb5e6978fc6ba24d859735f9a4f5679a5985426e | [
"MIT"
] | null | null | null | cpu/test_fwht.c | andres091096/fwht | fb5e6978fc6ba24d859735f9a4f5679a5985426e | [
"MIT"
] | null | null | null | cpu/test_fwht.c | andres091096/fwht | fb5e6978fc6ba24d859735f9a4f5679a5985426e | [
"MIT"
] | null | null | null | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h> //uint8_t
#include <math.h> //fabs, pow, sqrt
#include <string.h> //memset
#include <time.h>
#include "fwht.h"
void matrix_by_vector(int *a, uint8_t *b, float *product, int m, int n, float sqrt_eigval){
float tmp;
for (int i = 0; i < m; i++) {
tmp = 0;
for (int j = 0; j < n; j++) {
tmp += (a[i*n + j] * (float)b[j])/sqrt_eigval;
}
product[i] = tmp;
}
}
void matrix_transp_by_vector(int *a, float *b, float *product, int m, int n, float sqrt_eigval){
float tmp;
for (int j = 0; j < n; j++) {
tmp = 0;
for (int i = 0; i < m; i++) {
tmp += (a[j+ i*n] * b[i])/sqrt_eigval;
}
product[j] = tmp;
}
}
int main(int argc, char const *argv[])
{
int px = 64;
int py = 64;
int n = px*py;
int m = 1229;
float eig = 64;
int check_status = 0;
clock_t start, end;
double cpu_time_used;
int bits = log10(n)/log10(2); // log2(n*n)
unsigned int *index = (unsigned int*)calloc(n,sizeof(unsigned int));
uint8_t *Image = (uint8_t*)calloc(n,sizeof(uint8_t));
FILE *im_f;
im_f = fopen("../data/Shepp_Logan_Phantom_64.bin","rb");
fread(Image, n, sizeof(uint8_t), im_f);
fclose(im_f);
float *Image_fp = (float*)calloc(n,sizeof(float));
for (int i = 0; i < n; i++) {
index[i] = bit_reversal(binaryToGray(i),bits);
Image_fp[i] = (float)Image[i];
}
/* Generate the sensing matrix */
int *A_matrix = (int*)calloc(n*m,sizeof(int));
gen_sensing_matrix(A_matrix, n, m);
/* Compute the Matrix-by-vector product*/
float *b_mp = (float*)calloc(m,sizeof(float));
start = clock();
matrix_by_vector(A_matrix,Image, b_mp, m, n, eig);
end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
printf("INFO: Matrix by Vector Time: %f \n", cpu_time_used);
float *b_fw = (float*)calloc(m,sizeof(float));
start = clock();
fwht(Image_fp, b_fw, n, index, m, eig);
end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
printf("INFO: Fast WH-Transfor Time: %f \n", cpu_time_used);
for (int i = 0; i < m; i++) {
if (b_mp[i] != b_fw[i]){
check_status += 1;
printf("ERROR: Data Mismatch in forward stage: data : %i : Expected %f -> Got %f \n", i, b_mp[i] , b_fw[i]);
if ( check_status > 4){
break;
}
}
}
//calculate A'*b
float *Atb = (float*)calloc(n,sizeof(float));
start = clock();
matrix_transp_by_vector(A_matrix, b_mp, Atb, m, n, eig);
end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
printf("INFO: Matrix Transpose by Vector Time: %f \n", cpu_time_used);
float *Atb_fw = (float*)calloc(n,sizeof(float));
float *b_fw_ext = (float*)calloc(n,sizeof(float));
for (int i = 0; i < n; i++) {
if (i < m) {b_fw_ext[i] = b_fw[i];}
else {b_fw_ext[i] = 0; }
}
start = clock();
fwht(b_fw_ext, Atb_fw, n, index, n, eig);
end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
printf("INFO: Inverse Fast WH-Transfor Time: %f \n", cpu_time_used);
for (int i = 0; i < n; i++) {
if (Atb[i] != Atb_fw[i]){
check_status += 1;
printf("ERROR: Data Mismatch in backward stage: data : %i : Expected %f -> Got %f \n", i, Atb[i] , Atb_fw[i]);
if ( check_status > 4){
break;
}
}
}
free(Image);
free(A_matrix);
free(b_mp);
free(b_fw);
free(b_fw_ext);
free(Atb);
free(Atb_fw);
free(index);
if (check_status) {
printf("INFO: Test failed\n");
return EXIT_FAILURE;
} else {
printf("INFO: Test completed successfully.\n");
return EXIT_SUCCESS;
}
}
| 27.244444 | 118 | 0.581294 |
d8e927f401473f688de594972f1474f2ba7c8cde | 4,991 | h | C | test/benchmarks/supercop-20170228/crypto_sign/ed25519/hacl-star/x86_64/Ed25519.h | blipp/hacl-star | 1442c015dab97cdf203ae238b1f3aeccf511bd1e | [
"Apache-2.0"
] | 1 | 2021-07-26T16:09:46.000Z | 2021-07-26T16:09:46.000Z | test/benchmarks/supercop-20170228/crypto_sign/ed25519/hacl-star/x86_64/Ed25519.h | blipp/hacl-star | 1442c015dab97cdf203ae238b1f3aeccf511bd1e | [
"Apache-2.0"
] | null | null | null | test/benchmarks/supercop-20170228/crypto_sign/ed25519/hacl-star/x86_64/Ed25519.h | blipp/hacl-star | 1442c015dab97cdf203ae238b1f3aeccf511bd1e | [
"Apache-2.0"
] | null | null | null | /* This file was auto-generated by KreMLin! */
#ifndef __Ed25519_H
#define __Ed25519_H
#include "kremlib.h"
#include "testlib.h"
typedef uint64_t Hacl_Lib_Create64_h64;
typedef uint64_t Hacl_Bignum_Constants_limb;
typedef FStar_UInt128_t Hacl_Bignum_Constants_wide;
typedef uint64_t Hacl_Bignum_Parameters_limb;
typedef FStar_UInt128_t Hacl_Bignum_Parameters_wide;
typedef uint32_t Hacl_Bignum_Parameters_ctr;
typedef uint64_t *Hacl_Bignum_Parameters_felem;
typedef FStar_UInt128_t *Hacl_Bignum_Parameters_felem_wide;
typedef void *Hacl_Bignum_Parameters_seqelem;
typedef void *Hacl_Bignum_Parameters_seqelem_wide;
typedef FStar_UInt128_t Hacl_Bignum_Wide_t;
typedef uint64_t Hacl_Bignum_Limb_t;
extern void Hacl_Bignum_lemma_diff(Prims_int x0, Prims_int x1, Prims_pos x2);
typedef uint64_t *Hacl_EC_Point_point;
typedef uint8_t *Hacl_EC_Format_uint8_p;
typedef uint64_t Hacl_Bignum25519_limb;
typedef uint64_t *Hacl_Bignum25519_felem;
typedef void *Hacl_Bignum25519_seqelem;
typedef uint64_t *Hacl_Impl_Ed25519_ExtPoint_point;
typedef uint8_t *Hacl_Impl_Store51_uint8_p;
typedef uint64_t *Hacl_Impl_Store51_felem;
typedef uint8_t *Hacl_Impl_Ed25519_PointCompress_hint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_PointCompress_hint64_p;
typedef uint64_t *Hacl_Impl_Ed25519_SwapConditional_felem;
typedef uint8_t *Hacl_Impl_Ed25519_Ladder_Step_uint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_Ladder_elemB;
typedef uint8_t Hacl_Utils_Experimental_uint8_t;
typedef uint32_t Hacl_Utils_Experimental_uint32_t;
typedef uint64_t Hacl_Utils_Experimental_uint64_t;
typedef uint8_t Hacl_Utils_Experimental_huint8_t;
typedef uint32_t Hacl_Utils_Experimental_huint32_t;
typedef uint64_t Hacl_Utils_Experimental_huint64_t;
typedef uint8_t *Hacl_Utils_Experimental_huint8_p;
typedef uint32_t *Hacl_Utils_Experimental_huint32_p;
typedef uint64_t *Hacl_Utils_Experimental_huint64_p;
typedef uint8_t Hacl_Hash_SHA2_512_Lemmas_uint8_t;
typedef uint32_t Hacl_Hash_SHA2_512_Lemmas_uint32_t;
typedef uint64_t Hacl_Hash_SHA2_512_Lemmas_uint64_t;
typedef uint8_t Hacl_Hash_SHA2_512_Lemmas_uint8_ht;
typedef uint32_t Hacl_Hash_SHA2_512_Lemmas_uint32_ht;
typedef uint64_t Hacl_Hash_SHA2_512_Lemmas_uint64_ht;
typedef FStar_UInt128_t Hacl_Hash_SHA2_512_Lemmas_uint128_ht;
typedef uint64_t *Hacl_Hash_SHA2_512_Lemmas_uint64_p;
typedef uint8_t *Hacl_Hash_SHA2_512_Lemmas_uint8_p;
typedef uint8_t Hacl_Hash_SHA2_512_uint8_t;
typedef uint32_t Hacl_Hash_SHA2_512_uint32_t;
typedef uint64_t Hacl_Hash_SHA2_512_uint64_t;
typedef uint8_t Hacl_Hash_SHA2_512_uint8_ht;
typedef uint32_t Hacl_Hash_SHA2_512_uint32_ht;
typedef uint64_t Hacl_Hash_SHA2_512_uint64_ht;
typedef FStar_UInt128_t Hacl_Hash_SHA2_512_uint128_ht;
typedef uint64_t *Hacl_Hash_SHA2_512_uint64_p;
typedef uint8_t *Hacl_Hash_SHA2_512_uint8_p;
typedef struct {
uint32_t fst;
uint8_t *snd;
}
K___uint32_t_uint8_t_;
typedef uint8_t SHA2_512_uint8_t;
typedef uint32_t SHA2_512_uint32_t;
typedef uint64_t SHA2_512_uint64_t;
typedef uint8_t SHA2_512_uint8_ht;
typedef uint32_t SHA2_512_uint32_ht;
typedef uint64_t SHA2_512_uint64_ht;
typedef FStar_UInt128_t SHA2_512_uint128_ht;
typedef uint64_t *SHA2_512_uint64_p;
typedef uint8_t *SHA2_512_uint8_p;
typedef uint8_t *Hacl_Impl_Ed25519_SecretExpand_hint8_p;
typedef uint8_t *Hacl_Impl_Ed25519_SecretToPublic_hint8_p;
typedef Prims_nat Hacl_Impl_Ed25519_Verify_Lemmas_u51;
typedef uint8_t *Hacl_Impl_Ed25519_PointEqual_uint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_PointEqual_felem;
typedef uint32_t Hacl_Impl_Load56_u32;
typedef uint8_t Hacl_Impl_Load56_h8;
typedef uint64_t Hacl_Impl_Load56_h64;
typedef uint8_t *Hacl_Impl_Load56_hint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_RecoverX_elemB;
typedef uint32_t Hacl_Impl_Load51_u32;
typedef uint8_t Hacl_Impl_Load51_h8;
typedef uint64_t Hacl_Impl_Load51_h64;
typedef uint8_t *Hacl_Impl_Load51_hint8_p;
typedef uint8_t *Hacl_Impl_Store56_hint8_p;
typedef uint64_t *Hacl_Impl_Store56_qelem;
typedef uint8_t *Hacl_Impl_SHA512_Ed25519_1_hint8_p;
typedef uint8_t *Hacl_Impl_SHA512_Ed25519_hint8_p;
typedef uint8_t *Hacl_Impl_Sha512_hint8_p;
typedef FStar_UInt128_t Hacl_Lib_Create128_h128;
typedef uint64_t *Hacl_Impl_BignumQ_Mul_qelemB;
typedef uint64_t Hacl_Impl_BignumQ_Mul_h64;
typedef uint8_t *Hacl_Impl_Ed25519_Verify_Steps_uint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_Verify_Steps_felem;
typedef uint8_t *Hacl_Impl_Ed25519_Verify_uint8_p;
typedef uint64_t *Hacl_Impl_Ed25519_Verify_felem;
typedef uint8_t *Hacl_Impl_Ed25519_Sign_Steps_hint8_p;
typedef uint8_t *Hacl_Impl_Ed25519_Sign_hint8_p;
typedef uint8_t *Ed25519_uint8_p;
typedef uint8_t *Ed25519_hint8_p;
void *Ed25519_op_String_Access(FStar_HyperStack_mem h, uint8_t *b);
void Ed25519_sign(uint8_t *signature, uint8_t *secret, uint8_t *msg, uint32_t len1);
bool Ed25519_verify(uint8_t *public, uint8_t *msg, uint32_t len1, uint8_t *signature);
void Ed25519_secret_to_public(uint8_t *out, uint8_t *secret);
#endif
| 23.995192 | 86 | 0.872971 |
d8ea261a90fffb090b182013bf8657cacbccd305 | 115 | h | C | fluidpt.h | atif-hussain/fixedpt | dbda282fd5ff9640b37cd670a5c602c08f0b75f5 | [
"MIT"
] | 2 | 2018-02-13T12:08:18.000Z | 2018-02-13T12:08:20.000Z | fluidpt.h | atif-hussain/fixedpt | dbda282fd5ff9640b37cd670a5c602c08f0b75f5 | [
"MIT"
] | null | null | null | fluidpt.h | atif-hussain/fixedpt | dbda282fd5ff9640b37cd670a5c602c08f0b75f5 | [
"MIT"
] | null | null | null | #pragma once
template <int _q> class fixedpt;
class floatpt;
#include "fixedpt.h"
#include "floatpt.h"
| 12.777778 | 33 | 0.669565 |
d8ea78ee2386ab0b164a41f474ba409aed5e2df4 | 55,175 | c | C | FPSTest/image/8564_4.c | AndyZ-Salz/BadApple_QuecPython | cc9e2bce7dcebf02bad428a651a34b142215033e | [
"MIT"
] | null | null | null | FPSTest/image/8564_4.c | AndyZ-Salz/BadApple_QuecPython | cc9e2bce7dcebf02bad428a651a34b142215033e | [
"MIT"
] | null | null | null | FPSTest/image/8564_4.c | AndyZ-Salz/BadApple_QuecPython | cc9e2bce7dcebf02bad428a651a34b142215033e | [
"MIT"
] | null | null | null | const unsigned char gImage_8564_4[10880] = { /* 0X00,0X10,0X40,0X00,0X55,0X00,0X01,0X1B, */
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF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00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X65,0X29,
0X4D,0X6B,0X4D,0X6B,0XCB,0X5A,0X0C,0X63,0X34,0XA5,0XBA,0XD6,0X9A,0XD6,0X18,0XC6,
0XB6,0XB5,0XD7,0XBD,0XB6,0XB5,0XD7,0XBD,0XD7,0XBD,0XD7,0XBD,0X96,0XB5,0XD7,0XBD,
0XF7,0XBD,0X38,0XC6,0XF7,0XBD,0XD7,0XBD,0X7D,0XEF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XC3,0X18,0XC3,0X18,
0XA2,0X10,0XC3,0X18,0XC3,0X18,0XA2,0X10,0XC3,0X18,0XE3,0X18,0X04,0X21,0X41,0X08,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X45,0X29,0X30,0X84,0X59,0XCE,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0X82,0X10,0X65,0X29,0XCB,0X5A,0X71,0X8C,0X79,0XCE,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XD7,0XBD,0X8A,0X52,0X61,0X08,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X04,0X21,0X4D,0X6B,0XDF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X9E,0XF7,0X55,0XAD,0X0C,0X63,0X49,0X4A,0XA2,0X10,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0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XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XDF,0XFF,
0XA6,0X31,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,
};
| 80.783309 | 91 | 0.789977 |
d8edcd884f0973f438d7a9c036b9bb7d23da8d4b | 1,621 | h | C | STM32-WithHAL/Clock/Inc/clock.h | BilginistAdam/Drivers | 3197a05f72020a04dab51866a5f0cfa824aa56d1 | [
"MIT"
] | 1 | 2022-01-05T19:08:02.000Z | 2022-01-05T19:08:02.000Z | STM32-WithHAL/Clock/Inc/clock.h | BilginistAdam/Drivers | 3197a05f72020a04dab51866a5f0cfa824aa56d1 | [
"MIT"
] | null | null | null | STM32-WithHAL/Clock/Inc/clock.h | BilginistAdam/Drivers | 3197a05f72020a04dab51866a5f0cfa824aa56d1 | [
"MIT"
] | null | null | null | /*
* clock.h
*
* Created on: 5 Oca 2021
* Author: bilginistAdam
* E-Mail: bilginenesismail@gmail.com
*/
/* NOTES:
*
* If you are using this module, you must use a timer for periodic counter.
* Also, you must add function of clk_inc in this timer interrupt or sysTick timer interrupt.
* You should define time freq in function of clk_init().
*
*/
#ifndef _CLOCK_H_
#define _CLOCK_H_
/* Includes *************************************/
#include "main.h"
/* Defines **************************************/
#define CLK_TIM_MAX_VALUE 0xFFFFFFFFU
/* TypeDefs *************************************/
typedef enum{
CLK_OK = 0x00U,
CLK_ERROR = 0x01U
}CLK_Status_t;
typedef enum{
CLK_RESET = 0U,
CLK_SET = !CLK_RESET
}CLK_FlagStatus_t;
typedef enum{
CLK_TICK_FREQ_1HZ = 1000000U,
CLK_TICK_FREQ_10HZ = 100000U,
CLK_TICK_FREQ_100HZ = 10000U,
CLK_TICK_FREQ_1KHZ = 1000U,
CLK_TICK_FREQ_10KHZ = 100U,
CLK_TICK_FREQ_100KHZ = 10U,
CLK_TICK_FREQ_1MHZ = 1U,
CLK_TICK_FREQ_DEFAULT = CLK_TICK_FREQ_1KHZ
}CLK_TickFreq_t;
typedef struct{
CLK_TickFreq_t Freq;
TIM_HandleTypeDef * htim;
}CLK_Config_t;
typedef struct{
CLK_Config_t Config; /* It holds the Config of the Clock. */
uint32_t Time; /* It holds time data. */
}CLK_Handler_t;
/* Define Functions Prototype *******************/
// Init
CLK_Status_t CLK_Init(CLK_Handler_t* hclk);
// GET
uint32_t CLK_getTime(CLK_Handler_t * hclk);
// Calculator
uint32_t CLK_calElapsedTime(uint32_t StartTime, uint32_t Now);
// IT Handler
void CLK_incTick(CLK_Handler_t * hclk, TIM_HandleTypeDef * htim);
#endif /* _CLOCK_H_ */
| 22.513889 | 93 | 0.668723 |
d8ede9e1138f7f2fcd82c9a07344bb4c6a778095 | 8,910 | c | C | src/binding/fortran/mpif_h/setbot.c | valiantljk/collectiveIO-profile | 844f6296384459a41ae889cbe5a67e3f9da4b923 | [
"Unlicense"
] | null | null | null | src/binding/fortran/mpif_h/setbot.c | valiantljk/collectiveIO-profile | 844f6296384459a41ae889cbe5a67e3f9da4b923 | [
"Unlicense"
] | null | null | null | src/binding/fortran/mpif_h/setbot.c | valiantljk/collectiveIO-profile | 844f6296384459a41ae889cbe5a67e3f9da4b923 | [
"Unlicense"
] | null | null | null | /* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*
*/
#include "mpi_fortimpl.h"
#ifdef F77_NAME_UPPER
#define mpirinitc_ MPIRINITC
#define mpirinitc2_ MPIRINITC2
#elif defined(F77_NAME_LOWER_2USCORE) || defined(F77_NAME_LOWER_USCORE)
/* leave name alone */
#else
#define mpirinitc_ mpirinitc
#define mpirinitc2_ mpirinitc2
#endif
/* These functions are called from Fortran so only need prototypes in
this file. Note that the second-to-last argument is a character array, so
we need to include the elements of the Fortran character "dope vector".
*/
FORT_DLL_SPEC void FORT_CALL mpirinitc_( void *si, void *ssi,
void *bt, void *ip,
void *uw, void *ecsi,
void *asn FORT_MIXED_LEN(d1),
void *we
FORT_END_LEN(d1));
FORT_DLL_SPEC void FORT_CALL mpirinitc2_( char * FORT_MIXED_LEN_DECL
FORT_END_LEN_DECL );
/*
# These are here rather than in initf.c to solve some link order
# problems for Windows when separate libraries are used for the C and
# Fortran routines.
# Note that the global variables have values. This is to work around
# a bug in some C environments (e.g., Mac OS/X) that don't load
# external symbols that don't have a value assigned at compile time
# (so called common symbols)
*/
#ifndef F77_USE_BOOLEAN_LITERALS
#if defined(F77_RUNTIME_VALUES) || !defined(F77_TRUE_VALUE_SET)
MPI_Fint MPIR_F_TRUE = 1, MPIR_F_FALSE = 0;
#else
const MPI_Fint MPIR_F_TRUE=F77_TRUE_VALUE;
const MPI_Fint MPIR_F_FALSE=F77_FALSE_VALUE;
#endif
#endif
/*
# MPI-2, section 4.12.5, on the declaration of MPI_F_STATUS_IGNORE
# MPI_F_STATUSES_IGNORE as global variables in mpi.h (!)
*/
#ifndef USE_POINTER_FOR_BOTTOM
int MPIR_F_NeedInit = 1;
void *MPIR_F_MPI_BOTTOM = 0;
void *MPIR_F_MPI_IN_PLACE = 0;
void *MPIR_F_MPI_UNWEIGHTED = 0;
/* MPI_F_STATUS_IGNORE etc must be declared within mpi.h (MPI-2 standard
requires this) */
/*
void *MPI_F_STATUS_IGNORE = 0;
void *MPI_F_STATUSES_IGNORE = 0;
*/
MPI_Fint *MPI_F_ERRCODES_IGNORE = 0;
void *MPI_F_ARGVS_NULL = 0;
void *MPIR_F_MPI_WEIGHTS_EMPTY = 0;
#endif
FORT_DLL_SPEC void FORT_CALL mpirinitc_( void *si, void *ssi,
void *bt, void *ip,
void *uw, void *ecsi,
void *asn FORT_MIXED_LEN(d1),
void *we
FORT_END_LEN(d1))
{
MPI_F_STATUS_IGNORE = (MPI_Fint *) si;
MPI_F_STATUSES_IGNORE = (MPI_Fint *) ssi;
MPIR_F_MPI_BOTTOM = bt;
MPIR_F_MPI_IN_PLACE = ip;
MPIR_F_MPI_UNWEIGHTED = uw;
MPI_F_ERRCODES_IGNORE = (MPI_Fint *)ecsi;
MPI_F_ARGVS_NULL = asn;
MPIR_F_MPI_WEIGHTS_EMPTY = we;
}
/* Initialize the Fortran ARGV_NULL to a blank. Using this routine
avoids potential problems with string manipulation routines that
exist in the Fortran runtime but not in the C runtime libraries */
FORT_DLL_SPEC void FORT_CALL mpirinitc2_( char *an FORT_MIXED_LEN(d1)
FORT_END_LEN(d1) )
{
*an = ' ';
}
/*
Enable all known common block symbols mangling to be alias to each other,
i.e. [_C]mpifcmb*[_]to one symbol, mpifcmb*r.
Each common block is defined for one MPI Fortran special constant.
This is done to avoid alignment problem.
*/
#if defined(HAVE_C_MULTI_ATTR_ALIAS)
#define MPIF_STATUS_SIZE
struct mpif_cmblk1_t_ {
MPI_Fint MPIF_STATUS_IGNORE[MPIF_STATUS_SIZE];
};
typedef struct mpif_cmblk1_t_ mpif_cmblk1_t;
mpif_cmblk1_t mpifcmb1r = {{0}};
extern mpif_cmblk1_t _CMPIFCMB1 __attribute__ ((alias("mpifcmb1r")));
extern mpif_cmblk1_t MPIFCMB1 __attribute__ ((alias("mpifcmb1r")));
extern mpif_cmblk1_t MPIFCMB1_ __attribute__ ((alias("mpifcmb1r")));
extern mpif_cmblk1_t _Cmpifcmb1 __attribute__ ((alias("mpifcmb1r")));
extern mpif_cmblk1_t mpifcmb1 __attribute__ ((alias("mpifcmb1r")));
extern mpif_cmblk1_t mpifcmb1_ __attribute__ ((alias("mpifcmb1r")));
struct mpif_cmblk2_t_ {
MPI_Fint MPIF_STATUSES_IGNORE[1][MPIF_STATUS_SIZE];
};
typedef struct mpif_cmblk2_t_ mpif_cmblk2_t;
mpif_cmblk2_t mpifcmb2r = {{{0}}};
extern mpif_cmblk2_t _CMPIFCMB2 __attribute__ ((alias("mpifcmb2r")));
extern mpif_cmblk2_t MPIFCMB2 __attribute__ ((alias("mpifcmb2r")));
extern mpif_cmblk2_t MPIFCMB2_ __attribute__ ((alias("mpifcmb2r")));
extern mpif_cmblk2_t _Cmpifcmb2 __attribute__ ((alias("mpifcmb2r")));
extern mpif_cmblk2_t mpifcmb2 __attribute__ ((alias("mpifcmb2r")));
extern mpif_cmblk2_t mpifcmb2_ __attribute__ ((alias("mpifcmb2r")));
struct mpif_cmblk3_t_ {
MPI_Fint MPIF_BOTTOM;
};
typedef struct mpif_cmblk3_t_ mpif_cmblk3_t;
mpif_cmblk3_t mpifcmb3r = {0};
extern mpif_cmblk3_t _CMPIFCMB3 __attribute__ ((alias("mpifcmb3r")));
extern mpif_cmblk3_t MPIFCMB3 __attribute__ ((alias("mpifcmb3r")));
extern mpif_cmblk3_t MPIFCMB3_ __attribute__ ((alias("mpifcmb3r")));
extern mpif_cmblk3_t _Cmpifcmb3 __attribute__ ((alias("mpifcmb3r")));
extern mpif_cmblk3_t mpifcmb3 __attribute__ ((alias("mpifcmb3r")));
extern mpif_cmblk3_t mpifcmb3_ __attribute__ ((alias("mpifcmb3r")));
struct mpif_cmblk4_t_ {
MPI_Fint MPIF_IN_PLACE;
};
typedef struct mpif_cmblk4_t_ mpif_cmblk4_t;
mpif_cmblk4_t mpifcmb4r = {0};
extern mpif_cmblk4_t _CMPIFCMB4 __attribute__ ((alias("mpifcmb4r")));
extern mpif_cmblk4_t MPIFCMB4 __attribute__ ((alias("mpifcmb4r")));
extern mpif_cmblk4_t MPIFCMB4_ __attribute__ ((alias("mpifcmb4r")));
extern mpif_cmblk4_t _Cmpifcmb4 __attribute__ ((alias("mpifcmb4r")));
extern mpif_cmblk4_t mpifcmb4 __attribute__ ((alias("mpifcmb4r")));
extern mpif_cmblk4_t mpifcmb4_ __attribute__ ((alias("mpifcmb4r")));
struct mpif_cmblk5_t_ {
MPI_Fint MPIF_UNWEIGHTED;
};
typedef struct mpif_cmblk5_t_ mpif_cmblk5_t;
mpif_cmblk5_t mpifcmb5r = {0};
extern mpif_cmblk5_t _CMPIFCMB5 __attribute__ ((alias("mpifcmb5r")));
extern mpif_cmblk5_t MPIFCMB5 __attribute__ ((alias("mpifcmb5r")));
extern mpif_cmblk5_t MPIFCMB5_ __attribute__ ((alias("mpifcmb5r")));
extern mpif_cmblk5_t _Cmpifcmb5 __attribute__ ((alias("mpifcmb5r")));
extern mpif_cmblk5_t mpifcmb5 __attribute__ ((alias("mpifcmb5r")));
extern mpif_cmblk5_t mpifcmb5_ __attribute__ ((alias("mpifcmb5r")));
struct mpif_cmblk6_t_ {
MPI_Fint MPIF_ERRCODES_IGNORE[1];
};
typedef struct mpif_cmblk6_t_ mpif_cmblk6_t;
mpif_cmblk6_t mpifcmb6r = {{0}};
extern mpif_cmblk6_t _CMPIFCMB6 __attribute__ ((alias("mpifcmb6r")));
extern mpif_cmblk6_t MPIFCMB6 __attribute__ ((alias("mpifcmb6r")));
extern mpif_cmblk6_t MPIFCMB6_ __attribute__ ((alias("mpifcmb6r")));
extern mpif_cmblk6_t _Cmpifcmb6 __attribute__ ((alias("mpifcmb6r")));
extern mpif_cmblk6_t mpifcmb6 __attribute__ ((alias("mpifcmb6r")));
extern mpif_cmblk6_t mpifcmb6_ __attribute__ ((alias("mpifcmb6r")));
struct mpif_cmblk7_t_ {
char MPIF_ARGVS_NULL[1][1];
char pads[3];
};
typedef struct mpif_cmblk7_t_ mpif_cmblk7_t;
mpif_cmblk7_t mpifcmb7r = {{{0}}};
extern mpif_cmblk7_t _CMPIFCMB7 __attribute__ ((alias("mpifcmb7r")));
extern mpif_cmblk7_t MPIFCMB7 __attribute__ ((alias("mpifcmb7r")));
extern mpif_cmblk7_t MPIFCMB7_ __attribute__ ((alias("mpifcmb7r")));
extern mpif_cmblk7_t _Cmpifcmb7 __attribute__ ((alias("mpifcmb7r")));
extern mpif_cmblk7_t mpifcmb7 __attribute__ ((alias("mpifcmb7r")));
extern mpif_cmblk7_t mpifcmb7_ __attribute__ ((alias("mpifcmb7r")));
struct mpif_cmblk8_t_ {
char MPIF_ARGV_NULL[1];
char pads[3];
};
typedef struct mpif_cmblk8_t_ mpif_cmblk8_t;
mpif_cmblk8_t mpifcmb8r = {{0}};
extern mpif_cmblk8_t _CMPIFCMB8 __attribute__ ((alias("mpifcmb8r")));
extern mpif_cmblk8_t MPIFCMB8 __attribute__ ((alias("mpifcmb8r")));
extern mpif_cmblk8_t MPIFCMB8_ __attribute__ ((alias("mpifcmb8r")));
extern mpif_cmblk8_t _Cmpifcmb8 __attribute__ ((alias("mpifcmb8r")));
extern mpif_cmblk8_t mpifcmb8 __attribute__ ((alias("mpifcmb8r")));
extern mpif_cmblk8_t mpifcmb8_ __attribute__ ((alias("mpifcmb8r")));
struct mpif_cmblk9_t_ {
MPI_Fint MPIF_WEIGHTS_EMPTY;
};
typedef struct mpif_cmblk9_t_ mpif_cmblk9_t;
mpif_cmblk9_t mpifcmb9r = {0};
extern mpif_cmblk9_t _CMPIFCMB9 __attribute__ ((alias("mpifcmb9r")));
extern mpif_cmblk9_t MPIFCMB9 __attribute__ ((alias("mpifcmb9r")));
extern mpif_cmblk9_t MPIFCMB9_ __attribute__ ((alias("mpifcmb9r")));
extern mpif_cmblk9_t _Cmpifcmb9 __attribute__ ((alias("mpifcmb9r")));
extern mpif_cmblk9_t mpifcmb9 __attribute__ ((alias("mpifcmb9r")));
extern mpif_cmblk9_t mpifcmb9_ __attribute__ ((alias("mpifcmb9r")));
#endif
| 40.684932 | 77 | 0.714815 |
d8f1270d3450033c52d8162fbca876582e1977d7 | 3,899 | h | C | repos/XSB/packages/libwww/cc/libwww_parse_xml.h | HoaiNguyenofficial/AutoPenTest-using-DRL | 99a0c8d48a8bc69d8714334606f3de8f52e1d3cd | [
"BSD-3-Clause"
] | null | null | null | repos/XSB/packages/libwww/cc/libwww_parse_xml.h | HoaiNguyenofficial/AutoPenTest-using-DRL | 99a0c8d48a8bc69d8714334606f3de8f52e1d3cd | [
"BSD-3-Clause"
] | null | null | null | repos/XSB/packages/libwww/cc/libwww_parse_xml.h | HoaiNguyenofficial/AutoPenTest-using-DRL | 99a0c8d48a8bc69d8714334606f3de8f52e1d3cd | [
"BSD-3-Clause"
] | null | null | null | /* File: libwww_parse_xml.h
** Author(s): kifer, Yang Yang
** Contact: xsb-contact@cs.sunysb.edu
**
** Copyright (C) The Research Foundation of SUNY, 2000
**
** XSB 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.
**
** XSB 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 Library General Public License
** along with XSB; if not, write to the Free Software Foundation,
** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**
** $Id: libwww_parse_xml.h,v 1.9 2010-08-19 15:03:39 spyrosh Exp $
**
*/
typedef struct XML_userData USERDATA;
struct XML_userData {
DELETE_USERDATA * delete_method;
int status; /* this is used to carry status into
delete_userData */
XML_Parser parser;
HTRequest * request;
HTStream * target;
SGML_dtd * dtd;
int suppress_is_default; /* whether we begin parsing by
suppressing tags */
prolog_term parsed_term; /* actual result of the parse */
prolog_term parsed_term_tail; /* auxil variable */
int stackptr;
int stacksize; /* current size of stack */
struct stack_node {
XML_Char *tag; /* which element this is */
int suppress; /* whether this element is in the
suppressed region */
prolog_term elt_term; /* here we build elements */
prolog_term content_list_tail; /* auxil var to help build elements */
} *stack; /* keeps nested elements */
};
/* function declarations */
PRIVATE USERDATA *xml_create_userData(XML_Parser parser,
HTRequest *request,
HTStream *target_stream);
PRIVATE void xml_delete_userData(void *me);
PRIVATE int xml_push_element (USERDATA *userdata,
const XML_Char *tag,
const XML_Char **attrs);
PRIVATE void xml_pop_element(USERDATA *userdata);
PRIVATE void xml_push_suppressed_element(USERDATA *userdata,
const XML_Char *tag);
PRIVATE void xml_pop_suppressed_element(USERDATA *userdata);
PRIVATE void collect_xml_attributes (prolog_term elt_term,
const XML_Char **attrs);
PRIVATE void xml_addText (void *userdata,
const XML_Char *textbuf,
int len);
PRIVATE void xml_beginElement(void *userdata,
const XML_Char *tag,
const XML_Char **attributes);
PRIVATE void xml_endElement(void *userdata, const XML_Char *tag);
PRIVATE void xml_processingInstruction (void *userData,
const XML_Char *target,
const XML_Char *data);
PRIVATE void xml_unparsedEntityDecl (void *userData,
const XML_Char *entityName,
const XML_Char *base,
const XML_Char *systemId,
const XML_Char *publicId,
const XML_Char *notationName);
PRIVATE void xml_notationDecl (void *userData,
const XML_Char *notationName,
const XML_Char *base,
const XML_Char *systemId,
const XML_Char *publicId);
PRIVATE int xml_externalEntityRef (XML_Parser parser,
const XML_Char *openEntityNames,
const XML_Char *base,
const XML_Char *systemId,
const XML_Char *publicId);
PRIVATE int xml_unknownEncoding (void *encodingHandlerData,
const XML_Char *name,
XML_Encoding *info);
/*
PRIVATE void xml_default (void * userData, const XML_Char * s, int len);
*/
PRIVATE prolog_term xml_push_dummy(USERDATA *userdata);
| 37.133333 | 76 | 0.667351 |
d8f150a4894ead83b3e7d7521e83df29655916bd | 458 | h | C | CppDataVisLib/Backend.h | MichaelCoutlakis/CppDataVisLib | 836af6fcc1ce777c5f32dab92bdae391919dbd2d | [
"MIT"
] | null | null | null | CppDataVisLib/Backend.h | MichaelCoutlakis/CppDataVisLib | 836af6fcc1ce777c5f32dab92bdae391919dbd2d | [
"MIT"
] | null | null | null | CppDataVisLib/Backend.h | MichaelCoutlakis/CppDataVisLib | 836af6fcc1ce777c5f32dab92bdae391919dbd2d | [
"MIT"
] | null | null | null | /***************************************************************************//**
* \brief
* \copyright Michael Coutlakis 2021
* \license MIT License, see the LICENSE file.
*******************************************************************************/
#pragma once
#include <memory>
#include "Visitor.h"
namespace dvis
{
class Figure;
class XY_Plot;
class Backend : public Visitor
{
public:
/**
* .
*
*/
virtual ~Backend() {}
private:
};
}
| 14.774194 | 80 | 0.423581 |
d8fa62b2b0710d8975ab2fb970bad9fb7336283d | 1,113 | h | C | Xonix/include/Config.h | UberDever/Xonix | 6612ebda5f194db656f2c1641579219ccc251301 | [
"MIT"
] | null | null | null | Xonix/include/Config.h | UberDever/Xonix | 6612ebda5f194db656f2c1641579219ccc251301 | [
"MIT"
] | null | null | null | Xonix/include/Config.h | UberDever/Xonix | 6612ebda5f194db656f2c1641579219ccc251301 | [
"MIT"
] | null | null | null | #pragma once
#include <SDL.h>
#include <unordered_map>
#include "../include/Enums.h"
class Config
{
private:
Config()
{
eventMap[SDLK_w] = enums::GameEvent::Up;
eventMap[SDLK_a] = enums::GameEvent::Left;
eventMap[SDLK_s] = enums::GameEvent::Down;
eventMap[SDLK_d] = enums::GameEvent::Right;
eventMap[SDLK_ESCAPE] = enums::GameEvent::Quit;
}
Config(const Config&) = delete;
Config& operator=(Config&) = delete;
public:
std::unordered_map<SDL_Keycode, enums::GameEvent> eventMap;
const int windowWidth = 1440;
const int windowHeight = 900;
const bool isFullscreen = false;
public:
void load()
{
}
static Config& getConfig()
{
static Config instance;
return instance;
}
bool parseEvent(SDL_Event& rawEvent, enums::GameEvent& gameEvent)
{
if (rawEvent.type == SDL_KEYDOWN)
{
if (eventMap.find(rawEvent.key.keysym.sym) != eventMap.end())
{
gameEvent = eventMap[rawEvent.key.keysym.sym];
return true;
}
}
else if (rawEvent.type == SDL_MOUSEBUTTONDOWN)
{
gameEvent = enums::GameEvent::MouseButtonPressed;
return true;
}
return false;
}
};
| 18.245902 | 66 | 0.686433 |
d8fc4d693fc1e2482d7c4f395a64383811b1cba3 | 211 | h | C | src/arch/x86_64/x64lift.h | Mithreindeir/Revvit | bdd9e6c106c7030505a67db8bb7e5122221c2820 | [
"MIT"
] | 11 | 2017-10-18T11:38:42.000Z | 2022-02-23T03:13:49.000Z | src/arch/x86_64/x64lift.h | Mithreindeir/Revvit | bdd9e6c106c7030505a67db8bb7e5122221c2820 | [
"MIT"
] | 2 | 2018-05-25T15:01:20.000Z | 2018-05-31T20:17:58.000Z | src/arch/x86_64/x64lift.h | Mithreindeir/Revvit | bdd9e6c106c7030505a67db8bb7e5122221c2820 | [
"MIT"
] | 8 | 2017-04-07T05:42:45.000Z | 2022-01-28T20:43:28.000Z | #ifndef X64_LIFT_H
#define X64_LIFT_H
#include "x64assembler.h"
#include "../../dec/ril.h"
/*The Assembler shares a lot of functionality to lifting*/
ril_instruction *x64_operand_lift(char *operand);
#endif
| 17.583333 | 58 | 0.753555 |
d8fd35beb6912d51d09d2a7e26220e648adb7e81 | 334 | h | C | lib/libc/glibc/sysdeps/unix/sysv/linux/generic/xstatver.h | lukekras/zig | 6f303c01f3e06fe8203563065ea32537f6eff456 | [
"MIT"
] | 12,718 | 2018-05-25T02:00:44.000Z | 2022-03-31T23:03:51.000Z | lib/libc/glibc/sysdeps/unix/sysv/linux/generic/xstatver.h | lukekras/zig | 6f303c01f3e06fe8203563065ea32537f6eff456 | [
"MIT"
] | 8,483 | 2018-05-23T16:22:39.000Z | 2022-03-31T22:18:16.000Z | lib/libc/glibc/sysdeps/unix/sysv/linux/generic/xstatver.h | lukekras/zig | 6f303c01f3e06fe8203563065ea32537f6eff456 | [
"MIT"
] | 1,400 | 2018-05-24T22:35:25.000Z | 2022-03-31T21:32:48.000Z | /* Versions of the 'struct stat' data structure used in compatibility xstat
functions. */
#define _STAT_VER_KERNEL 0
#define _STAT_VER_LINUX 0
#define _STAT_VER _STAT_VER_KERNEL
/* Versions of the 'xmknod' interface used in compatibility xmknod
functions. */
#define _MKNOD_VER_LINUX 0
#define _MKNOD_VER _MKNOD_VER_LINUX
| 30.363636 | 75 | 0.784431 |
2b06ad7d10a0b03d113eda12d2bd361be0c8364a | 65 | c | C | src/common/Constants.c | eGluZl/Coco-C-Learn | 748451e33f7c8269a1f12aabc88750acfceca44e | [
"MIT"
] | null | null | null | src/common/Constants.c | eGluZl/Coco-C-Learn | 748451e33f7c8269a1f12aabc88750acfceca44e | [
"MIT"
] | null | null | null | src/common/Constants.c | eGluZl/Coco-C-Learn | 748451e33f7c8269a1f12aabc88750acfceca44e | [
"MIT"
] | null | null | null | //
// Created by imhxy on 2021-04-10.
//
#include "Constants.h"
| 10.833333 | 34 | 0.630769 |
2b06afd36280febdc1a389fe5936f97d0084209b | 15,220 | c | C | background1.c | CelestialAmber/tobutobugirl-dx | 5c2ec21f800966c67825afe825765a082021b2da | [
"MIT"
] | 47 | 2019-10-28T21:49:06.000Z | 2022-03-06T12:21:38.000Z | background1.c | CelestialAmber/tobutobugirl-dx | 5c2ec21f800966c67825afe825765a082021b2da | [
"MIT"
] | null | null | null | background1.c | CelestialAmber/tobutobugirl-dx | 5c2ec21f800966c67825afe825765a082021b2da | [
"MIT"
] | 5 | 2019-10-29T02:38:16.000Z | 2021-09-12T02:51:03.000Z | #include "background1.h"
const unsigned char background1_data[] = {
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
224, 31, 240, 15, 252, 3, 254, 1, 255, 0, 255, 0, 255, 0, 255, 0,
0, 2, 255, 0, 255, 0, 255, 0, 255, 128, 127, 224, 31, 248, 7, 254,
1, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 1, 254, 3, 252, 3, 252, 7, 248, 7, 248, 15, 240, 31, 224, 63,
192, 0, 255, 128, 127, 128, 127, 192, 63, 192, 63, 192, 63, 192, 63, 192,
63, 0, 255, 3, 252, 7, 248, 15, 240, 31, 224, 31, 224, 63, 192, 63,
192, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127, 0, 31, 0, 15,
0, 192, 63, 192, 63, 192, 63, 192, 63, 192, 63, 192, 63, 192, 63, 192,
63, 63, 2, 192, 63, 192, 63, 192, 63, 192, 63, 192, 63, 192, 127, 128,
127, 128, 15, 0, 7, 0, 7, 0, 0, 11, 255, 0, 255, 0, 255, 0,
63, 0, 0, 9, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 63, 0,
31, 0, 15, 0, 192, 63, 192, 63, 224, 31, 224, 31, 240, 15, 240, 15,
248, 7, 248, 7, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 255, 1, 254, 0, 255, 0, 255, 0, 255, 1, 254, 3, 252, 15, 240,
31, 224, 255, 0, 127, 128, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 0, 17, 15, 0, 7, 0, 3, 0, 0, 5, 1, 0,
0, 5, 255, 0, 255, 0, 255, 0, 1, 0, 127, 0, 255, 0, 63, 0,
7, 0, 252, 3, 254, 1, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 0, 2, 255, 0, 255, 128, 127, 224, 31, 255, 0, 255, 0, 255,
0, 255, 0, 0, 2, 255, 0, 255, 0, 255, 0, 255, 240, 15, 248, 7,
248, 7, 252, 3, 3, 2, 252, 31, 224, 63, 192, 127, 128, 127, 128, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 254,
0, 252, 0, 248, 0, 0, 13, 1, 0, 3, 0, 0, 9, 7, 0, 255,
0, 255, 0, 255, 0, 1, 0, 0, 7, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 1, 0, 15, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252,
3, 255, 0, 127, 128, 127, 128, 63, 192, 63, 192, 63, 192, 31, 224, 31,
224, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 254, 0, 224, 0, 0,
3, 248, 0, 248, 0, 224, 0, 192, 0, 128, 0, 0, 13, 1, 0, 3,
0, 3, 0, 7, 0, 31, 0, 3, 0, 7, 0, 15, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 31, 224, 31, 224, 15, 240, 15, 240, 15,
240, 15, 240, 15, 240, 15, 240, 255, 0, 255, 0, 192, 0, 248, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 7, 192, 0, 248,
0, 252, 0, 248, 0, 255, 0, 126, 0, 0, 11, 63, 0, 63, 0, 63,
0, 31, 0, 7, 0, 3, 0, 0, 5, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 127, 0, 63, 0, 248, 7, 248, 7, 248, 7, 248,
7, 240, 15, 240, 15, 240, 15, 240, 15, 0, 255, 0, 255, 1, 254, 7,
248, 15, 240, 31, 224, 127, 128, 255, 0, 0, 2, 255, 127, 128, 255, 0,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 2, 255, 192, 63, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 15, 240, 63, 192, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 254, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 3, 128, 0, 224,
0, 252, 0, 255, 0, 254, 0, 248, 0, 240, 0, 31, 0, 31, 0, 3,
0, 1, 0, 0, 9, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127,
0, 127, 0, 127, 0, 240, 15, 240, 15, 240, 15, 240, 15, 240, 15, 240,
15, 240, 15, 240, 15, 1, 254, 1, 254, 3, 252, 3, 252, 7, 248, 15,
240, 31, 224, 63, 192, 224, 0, 192, 0, 192, 0, 192, 0, 192, 0, 192,
0, 224, 0, 224, 0, 0, 7, 1, 0, 3, 0, 31, 0, 63, 0, 7,
0, 127, 0, 127, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 248, 7, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 0, 2, 255, 0, 255, 7, 248, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 224, 0, 224, 0, 192, 0, 192, 0, 128, 0, 128, 0, 128, 0,
0, 3, 255, 0, 63, 0, 15, 0, 0, 11, 255, 0, 255, 0, 255, 0,
127, 0, 63, 0, 63, 0, 63, 0, 127, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 254, 0, 252, 0, 240, 0, 0, 5, 1, 0, 3, 0,
7, 0, 63, 0, 127, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 192, 0, 240, 0, 255, 0, 255, 0, 255, 0, 255, 0,
252, 0, 192, 0, 0, 5, 255, 0, 255, 0, 255, 0, 240, 0, 0, 9,
255, 0, 252, 0, 192, 0, 0, 11, 252, 0, 0, 15, 255, 0, 127, 0,
63, 0, 7, 0, 1, 0, 0, 7, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 0, 7, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
31, 0, 1, 0, 252, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 0, 5, 224, 0, 248, 0, 255, 0, 255, 0, 240, 0,
254, 0, 0, 9, 128, 0, 0, 21, 3, 0, 1, 0, 3, 0, 7, 0,
7, 0, 15, 0, 31, 0, 255, 0, 255, 0, 224, 0, 240, 0, 248, 0,
254, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 9, 128, 0, 240, 0,
252, 0, 255, 0, 15, 0, 0, 3, 3, 0, 31, 0, 127, 0, 63, 0,
15, 0, 3, 0, 255, 0, 63, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 128, 0, 128, 0, 192, 0, 240, 0, 248, 0, 248, 0,
248, 0, 248, 0, 255, 0, 63, 0, 31, 0, 15, 0, 7, 0, 3, 0,
3, 0, 1, 0, 252, 0, 252, 0, 254, 0, 254, 0, 255, 0, 255, 0,
255, 0, 255, 0, 0, 11, 128, 0, 192, 0, 224, 0, 1, 0, 1, 0,
0, 13, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127, 0,
127, 0, 240, 0, 248, 0, 252, 0, 254, 0, 254, 0, 254, 0, 252, 0,
240, 0, 127, 0, 63, 0, 31, 0, 7, 0, 0, 9, 255, 0, 255, 0,
255, 0, 255, 0, 255, 0, 31, 0, 15, 0, 7, 0, 255, 0, 255, 0,
255, 0, 255, 0, 255, 0, 255, 0, 128, 0, 224, 0, 254, 0, 255, 0,
255, 0, 248, 0, 0, 11, 240, 0, 192, 0, 0, 11, 3, 0, 1, 0,
1, 0, 0, 11, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 63, 0,
7, 0, 1, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 252, 0, 252, 0, 255, 0, 254, 0, 255, 0, 255, 0, 255, 0,
192, 0, 0, 9, 248, 0, 224, 0, 0, 7, 63, 0, 15, 0, 3, 0,
1, 0, 0, 9, 255, 0, 255, 0, 255, 0, 254, 0, 252, 0, 0, 7,
224, 0, 128, 0, 0, 25, 48, 12, 112, 14, 0, 0, 15, 1, 0, 0,
10, 12, 112, 30, 224, 31, 224, 0, 0, 8, 1, 0, 1, 0, 3, 0,
3, 0, 112, 15, 248, 7, 248, 7, 252, 3, 252, 3, 254, 1, 255, 0,
255, 0, 0, 4, 128, 0, 192, 0, 224, 0, 248, 0, 252, 0, 254, 0,
255, 0, 0, 13, 3, 0, 7, 0, 3, 0, 7, 0, 7, 0, 15, 0,
31, 0, 63, 0, 255, 0, 255, 63, 192, 63, 192, 127, 128, 127, 128, 127,
128, 127, 128, 127, 128, 127, 128, 128, 2, 0, 224, 0, 240, 0, 248, 0,
252, 0, 254, 0, 255, 0, 255, 0, 0, 15, 128, 0, 0, 11, 7, 0,
15, 0, 63, 0, 7, 0, 31, 0, 63, 0, 127, 0, 255, 0, 255, 0,
255, 0, 255, 0, 255, 0, 254, 1, 254, 1, 252, 3, 252, 3, 248, 7,
240, 15, 224, 31, 0, 128, 0, 192, 0, 224, 0, 248, 0, 254, 0, 255,
0, 255, 0, 255, 0, 0, 11, 128, 0, 224, 0, 248, 0, 0, 11, 1,
0, 31, 0, 63, 0, 15, 0, 31, 0, 63, 0, 127, 0, 255, 0, 255,
0, 255, 0, 255, 63, 192, 31, 224, 15, 240, 15, 240, 7, 248, 3, 252,
3, 252, 3, 252, 192, 0, 224, 0, 248, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 0, 7, 192, 0, 224, 0, 240, 0, 248, 0, 255, 0,
0, 15, 255, 0, 0, 15, 1, 0, 1, 0, 3, 0, 7, 0, 15, 0,
31, 0, 127, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 254, 1, 252, 3, 240, 15, 192, 63, 128, 127, 128, 127, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 252, 0, 254, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 5, 128, 0, 192, 0, 224,
0, 252, 0, 255, 0, 255, 0, 127, 0, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 3, 252, 7, 248, 15, 240, 15, 240, 0, 255,
0, 255, 0, 255, 0, 255, 255, 2, 0, 255, 0, 255, 0, 255, 0, 0,
2, 255, 0, 255, 0, 255, 0, 255, 255, 2, 0, 255, 0, 255, 0, 255,
0, 127, 128, 63, 192, 31, 224, 15, 240, 192, 0, 240, 15, 252, 3, 254,
1, 255, 0, 255, 0, 255, 0, 255, 0, 3, 0, 3, 252, 7, 248, 7,
248, 7, 248, 199, 56, 243, 12, 252, 3, 224, 31, 192, 63, 192, 63, 192,
63, 192, 63, 224, 31, 240, 15, 252, 3, 0, 255, 0, 255, 0, 255, 0,
255, 7, 248, 63, 192, 255, 0, 255, 0, 0, 2, 255, 1, 254, 15, 240,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 2, 255, 255, 2, 0,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 2, 255, 192,
63, 254, 1, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 0, 2, 255,
0, 255, 0, 255, 224, 31, 254, 1, 255, 0, 255, 0, 255, 0, 15, 240,
7, 248, 3, 252, 0, 255, 0, 255, 224, 31, 254, 1, 255, 0, 255, 0,
255, 0, 255, 0, 7, 248, 3, 252, 1, 254, 0, 255, 224, 31, 255, 0,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127, 128, 63, 192,
255, 0, 255, 0, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 255, 0, 255, 0, 63, 192, 199, 56, 192, 63, 128, 127, 254, 1,
254, 1, 252, 3, 248, 7, 240, 15, 192, 63, 0, 255, 0, 255, 3, 252,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
15, 240, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0,
255, 0, 31, 224, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 254, 1,
248, 7, 0, 255, 0, 255, 254, 1, 255, 0, 255, 0, 255, 0, 0, 2,
255, 0, 255, 0, 255, 0, 255, 0, 255, 240, 15, 255, 0, 224, 31, 0,
255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 1, 254, 31, 224, 0,
255, 0, 255, 0, 255, 0, 255, 1, 254, 15, 240, 255, 0, 255, 0, 0,
2, 255, 0, 255, 7, 248, 63, 192, 255, 0, 255, 0, 255, 0, 255, 0,
0, 2, 255, 224, 31, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 127, 128, 63, 192, 15, 240, 3, 252, 0, 255, 252,
3, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127, 128, 7,
248, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 224, 31, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 192, 63, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 240, 15, 3, 252, 255, 0, 255, 0, 255, 0, 255,
0, 252, 3, 128, 127, 31, 224, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 7, 248, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 128, 127, 240, 15, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 31, 224, 0, 255, 1, 254, 15, 240, 195, 60, 248, 7, 255, 0, 255,
0, 255, 0, 7, 248, 255, 0, 255, 0, 255, 0, 127, 128, 15, 240, 225,
30, 254, 1, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 63, 192, 199, 56, 248, 7, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 31, 224, 227, 28, 252, 3, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 127, 128, 135, 120, 248,
7, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 248,
7, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 240, 15, 135, 120, 127,
128, 254, 1, 252, 3, 248, 7, 224, 31, 0, 255, 63, 192, 255, 0, 255,
0, 135, 120, 252, 3, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 127, 128, 199, 56, 252, 3, 255, 0, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 127, 128, 224, 31, 255, 0, 255, 0, 255,
0, 255, 0, 255, 0, 255, 0, 255, 0, 129, 126, 255, 0, 255, 0, 255,
0, 255, 0, 254, 1, 241, 14, 31, 224, 255, 0, 255, 0, 255, 0, 255,
0, 199, 56, 63, 192, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255,
0
};
const unsigned char background1_tiles[] = {
35, 35, 3, 36, 37, 38, 38, 12, 39, 35, 35, 5, 40, 38, 38, 10, 41, 35, 42, 35,
35, 4, 43, 38, 38, 10, 44, 35, 45, 46, 47, 35, 35, 2, 48, 38, 38, 8, 49, 50,
51, 35, 52, 52, 2, 53, 54, 35, 55, 56, 57, 38, 38, 5, 58, 35, 35, 3, 59, 52,
60, 61, 62, 63, 35, 35, 2, 64, 38, 38, 5, 65, 35, 35, 2, 66, 67, 68, 69, 35,
35, 5, 64, 38, 38, 5, 70, 71, 72, 73, 52, 74, 75, 35, 35, 5, 76, 38, 38, 2,
77, 78, 79, 80, 35, 81, 82, 52, 52, 2, 83, 84, 35, 35, 4, 85, 38, 86, 35, 35,
6, 87, 52, 52, 2, 88, 89, 35, 35, 4, 90, 91, 51, 35, 35, 6, 92, 52, 52, 3,
93, 94, 35, 35, 11, 95, 52, 52, 4, 96, 35, 35, 7, 97, 98, 99, 100, 101, 52, 52,
5, 102, 103, 104, 35, 35, 5, 105, 106, 107, 52, 52, 9, 108, 109, 35, 35, 6, 110, 111,
52, 52, 8, 112, 113, 35, 35, 8, 114, 52, 52, 8, 115, 35, 35, 8, 116, 117, 52, 52,
7, 118, 119, 35, 35, 8, 120, 52, 52, 8, 121, 122, 35, 35, 4, 123, 103, 124, 125, 52,
52, 9, 126, 127, 35, 35, 2, 128, 129, 130, 52, 52, 13, 131, 132, 133, 52, 52, 19, 134,
52, 52, 6, 135, 136, 52, 52, 8, 137, 138, 139, 52, 52, 4, 140, 141, 142, 143, 144, 52,
52, 5, 145, 146, 147, 38, 148, 149, 52, 150, 151, 38, 152, 35, 153, 154, 155, 52, 156, 157,
35, 158, 159, 38, 38, 2, 160, 161, 162, 38, 38, 2, 163, 164, 165, 35, 35, 2, 166, 167,
35, 35, 2, 168, 38, 38, 5, 169, 170, 171, 172, 173, 174, 175, 176, 35, 35, 2, 177, 178,
179, 38, 38, 5, 35, 35, 7, 180, 181, 182, 183, 184, 185, 186, 187, 78, 171, 188, 189, 190,
35, 35, 5, 191, 192, 193, 194, 195, 35, 35, 7, 196, 197, 198, 35, 35, 17, 199, 200, 201,
202, 176, 35, 35, 7, 203, 204, 205, 35, 35, 7, 206, 207, 208, 35, 35, 3, 209, 210, 211,
35, 35, 20
};
| 82.27027 | 103 | 0.382654 |
2b0aa7992a323be0fd7cad11979ac9ef3b17420c | 467 | h | C | include/shooter/bullet.h | CS126SP20/galaxian-shalnisundram | 510b4ecbe62e9f9bd4194ff858a562e6f42b5930 | [
"MIT"
] | 1 | 2020-10-14T18:07:13.000Z | 2020-10-14T18:07:13.000Z | include/shooter/bullet.h | CS126SP20/galaxian-shalnisundram | 510b4ecbe62e9f9bd4194ff858a562e6f42b5930 | [
"MIT"
] | null | null | null | include/shooter/bullet.h | CS126SP20/galaxian-shalnisundram | 510b4ecbe62e9f9bd4194ff858a562e6f42b5930 | [
"MIT"
] | null | null | null | //
// Created by Shalni Sundram on 4/22/20.
//
#ifndef FINALPROJECT_BULLET_H
#define FINALPROJECT_BULLET_H
#include "cinder/app/App.h"
#include "pretzel/PretzelGui.h"
using namespace ci;
using namespace ci::app;
using namespace std;
namespace shooter {
class Bullet {
private:
vec2 bullet_position_;
public:
Bullet(const vec2& bullet_position_);
vec2 GetBulletPosition();
void SetBulletPosition(vec2 position);
};
}
#endif // FINALPROJECT_BULLET_H
| 15.566667 | 40 | 0.751606 |
2b0ca118189643d0b4e510b24a966ec48b8f29aa | 2,888 | h | C | VisionRPCLib/Classes/RPC/google/api/Backend.pbobjc.h | cpllj/RPC | 73931a563ed7321f1f7e15ee8e3198a31e3fd0bc | [
"MIT"
] | null | null | null | VisionRPCLib/Classes/RPC/google/api/Backend.pbobjc.h | cpllj/RPC | 73931a563ed7321f1f7e15ee8e3198a31e3fd0bc | [
"MIT"
] | null | null | null | VisionRPCLib/Classes/RPC/google/api/Backend.pbobjc.h | cpllj/RPC | 73931a563ed7321f1f7e15ee8e3198a31e3fd0bc | [
"MIT"
] | null | null | null | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/backend.proto
// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
#define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif
#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBProtocolBuffers.h>
#else
#import "GPBProtocolBuffers.h"
#endif
#if GOOGLE_PROTOBUF_OBJC_VERSION < 30004
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
// @@protoc_insertion_point(imports)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
CF_EXTERN_C_BEGIN
@class BackendRule;
NS_ASSUME_NONNULL_BEGIN
#pragma mark - BackendRoot
/**
* Exposes the extension registry for this file.
*
* The base class provides:
* @code
* + (GPBExtensionRegistry *)extensionRegistry;
* @endcode
* which is a @c GPBExtensionRegistry that includes all the extensions defined by
* this file and all files that it depends on.
**/
GPB_FINAL @interface BackendRoot : GPBRootObject
@end
#pragma mark - Backend
typedef GPB_ENUM(Backend_FieldNumber) {
Backend_FieldNumber_RulesArray = 1,
};
/**
* `Backend` defines the backend configuration for a service.
**/
GPB_FINAL @interface Backend : GPBMessage
/**
* A list of backend rules providing configuration for individual API
* elements.
**/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<BackendRule*> *rulesArray;
/** The number of items in @c rulesArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger rulesArray_Count;
@end
#pragma mark - BackendRule
typedef GPB_ENUM(BackendRule_FieldNumber) {
BackendRule_FieldNumber_Selector = 1,
BackendRule_FieldNumber_Address = 2,
BackendRule_FieldNumber_Deadline = 3,
};
/**
* A backend rule provides configuration for an individual API element.
**/
GPB_FINAL @interface BackendRule : GPBMessage
/**
* Selects the methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
**/
@property(nonatomic, readwrite, copy, null_resettable) NSString *selector;
/** The address of the API backend. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *address;
/**
* The number of seconds to wait for a response from a request. The
* default depends on the deployment context.
**/
@property(nonatomic, readwrite) double deadline;
@end
NS_ASSUME_NONNULL_END
CF_EXTERN_C_END
#pragma clang diagnostic pop
// @@protoc_insertion_point(global_scope)
| 26.740741 | 125 | 0.778047 |
2b0cc22b4b6272d385b32aa4f7e35892d77e4372 | 2,661 | h | C | include/mc/algorithms/common/cube_definitions.h | glines/libmc | 4d74c630252a0e46fda9dbec357bd1cd47223f1f | [
"MIT"
] | 14 | 2017-01-10T16:33:25.000Z | 2020-05-12T18:49:02.000Z | include/mc/algorithms/common/cube_definitions.h | auntieNeo/libmc | 4d74c630252a0e46fda9dbec357bd1cd47223f1f | [
"MIT"
] | null | null | null | include/mc/algorithms/common/cube_definitions.h | auntieNeo/libmc | 4d74c630252a0e46fda9dbec357bd1cd47223f1f | [
"MIT"
] | 3 | 2017-09-20T01:05:10.000Z | 2020-12-29T09:13:23.000Z | /*
* Copyright (c) 2016 Jonathan Glines
* Jonathan Glines <jonathan@glines.net>
*
* 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 MC_ALGORITHMS_COMMON_CUBE_DEFINITIONS_H_
#define MC_ALGORITHMS_COMMON_CUBE_DEFINITIONS_H_
#define MC_CUBE_NUM_VERTICES 8
#define MC_CUBE_NUM_EDGES 12
#define MC_CUBE_NUM_FACES 6
#define MC_CUBE_NUM_CANONICAL_ORIENTATIONS 23
#define MC_CUBE_NUM_CANONICAL_ORIENTATION_INVERSIONS 15
/**
* The numbering of the cube faces is based on the numbering of the faces on a
* 6-sided die with 1 facing front and 3 facing top.
*
* Note that when viewing the 1 side of a cube from the front in this manner,
* the left face of the cube is side 2. That is to say, left and right are
* considered relative to the cube not relative to the viewer. This is easiest
* to understand with an actual die in hand.
*/
typedef enum {
MC_CUBE_FACE_FRONT = 0,
MC_CUBE_FACE_LEFT,
MC_CUBE_FACE_TOP,
MC_CUBE_FACE_BOTTOM,
MC_CUBE_FACE_RIGHT,
MC_CUBE_FACE_BACK,
} mcCubeFace;
/**
* The numbering for this cube edge is taken from the original Lorensen paper
* on marching cubes.
*
* Note that the ordering of faces in these names is done alphabetically to
* avoid confusion that might result from arbitrary ordering.
*/
typedef enum mcCubeEdge {
MC_CUBE_EDGE_BOTTOM_FRONT = 0,
MC_CUBE_EDGE_FRONT_LEFT,
MC_CUBE_EDGE_FRONT_TOP,
MC_CUBE_EDGE_FRONT_RIGHT,
MC_CUBE_EDGE_BACK_BOTTOM,
MC_CUBE_EDGE_BACK_LEFT,
MC_CUBE_EDGE_BACK_TOP,
MC_CUBE_EDGE_BACK_RIGHT,
MC_CUBE_EDGE_BOTTOM_RIGHT,
MC_CUBE_EDGE_BOTTOM_LEFT,
MC_CUBE_EDGE_RIGHT_TOP,
MC_CUBE_EDGE_LEFT_TOP,
} mcCubeEdge;
#endif
| 35.48 | 79 | 0.780909 |
faf2f46107aaf7af8fd91afc641540ce893add07 | 1,104 | c | C | karman/Antoonvh/testvofsketch.c | MNegus/fluid-art | 47721e59c3b8e8db562133888571cb17c568eaf6 | [
"Apache-2.0"
] | null | null | null | karman/Antoonvh/testvofsketch.c | MNegus/fluid-art | 47721e59c3b8e8db562133888571cb17c568eaf6 | [
"Apache-2.0"
] | null | null | null | karman/Antoonvh/testvofsketch.c | MNegus/fluid-art | 47721e59c3b8e8db562133888571cb17c568eaf6 | [
"Apache-2.0"
] | null | null | null | /**
# Test for Spherical interface plotting
We plot two spheres, two smooth vof interfaces, and two times the
facets for a vof field.

*/
#include "grid/multigrid3D.h"
#include "bwatch.h"
scalar dummy[], f1[], f2[], f3[], f4[];
int main() {
FILE * fp = popen ("ppm2mp4 -r 0.5 test.mp4", "w");
X0 = Y0 = Z0 = -L0/2;
watch (nx = 800, ny = 600);
for (N = 16; N < 257; N *= 2) {
init_grid (N);
fraction (f1, (0.12 - sqrt(sq(x - 0.3) + sq(y - 0.2) + sq(z))));
fraction (f2, (0.12 - sqrt(sq(x) + sq(y - 0.2) + sq(z))));
fraction (f3, (0.12 - sqrt(sq(x - 0.3) + sq(y + 0.2) + sq(z))));
fraction (f4, (0.12 - sqrt(sq(x) + sq(y + 0.2) + sq(z))));
restriction ({f1, f3});
sketch_vof (f3);
sketch_vof (f1, mat = {ind = 1.1});
equiplane (f4, vof = true);
equiplane (f2, vof = true, mat = {ind = 1.1});
sphere (0.12, {-0.3, -0.2,0}, );
sphere (0.12, {-0.3, 0.2,0}, mat = {ind = 1.1});
sphere (6, mat = {dull = true});
store (fp);
plain();
}
pclose (fp);
}
| 24 | 68 | 0.512681 |
faf5817a7a3186f3fdcacd2afb8cc6dd4e09ff75 | 659 | h | C | ngxfs_nn/_include/ngx_c_conf.h | gogobody/spakelfs | 77efb0b51cf07d3319424df997f742d4dd42b300 | [
"MIT"
] | null | null | null | ngxfs_nn/_include/ngx_c_conf.h | gogobody/spakelfs | 77efb0b51cf07d3319424df997f742d4dd42b300 | [
"MIT"
] | null | null | null | ngxfs_nn/_include/ngx_c_conf.h | gogobody/spakelfs | 77efb0b51cf07d3319424df997f742d4dd42b300 | [
"MIT"
] | null | null | null |
#ifndef __NGX_CONF_H__
#define __NGX_CONF_H__
#include <vector>
#include "ngx_global.h"
class CConfig
{
//Singleton with correct destruction, and thread-safe -- Meyer's Singleton
private:
CConfig();
public:
~CConfig();
CConfig(const CConfig&) = delete;
CConfig& operator=(const CConfig&) = delete;
public:
static CConfig* GetInstance()
{
static CConfig m_instance;
return &m_instance;
}
public:
bool Load(const char *pconfName);
const char *GetString(const char *p_itemname);
int GetIntDefault(const char *p_itemname,const int def);
public:
std::vector<LPCConfItem> m_ConfigItemList; //to store config info
};
#endif
| 17.342105 | 75 | 0.720789 |
faf76d9fef4b2a77c246f84faef263200eda7553 | 1,813 | c | C | src/add-ons/kernel/drivers/network/wlan/realtekwifi/glue.c | waddlesplash/haiku | 68d1b97e4f99fa0f190579f7ffd16fceda23ebce | [
"MIT"
] | 2 | 2021-11-30T22:17:42.000Z | 2022-02-04T20:57:17.000Z | src/add-ons/kernel/drivers/network/wlan/realtekwifi/glue.c | grexe/haiku | 4b0d8831c29fde017869ac7e77fdf7871bbc4b10 | [
"MIT"
] | null | null | null | src/add-ons/kernel/drivers/network/wlan/realtekwifi/glue.c | grexe/haiku | 4b0d8831c29fde017869ac7e77fdf7871bbc4b10 | [
"MIT"
] | null | null | null | /*
* Copyright 2018, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT license.
*/
#include <sys/bus.h>
#include <sys/kernel.h>
#include <dev/pci/pcivar.h>
#include <machine/bus.h>
#include <net/if.h>
#include <net/if_media.h>
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_amrr.h>
#include <dev/rtwn/if_rtwnvar.h>
#include <dev/rtwn/pci/rtwn_pci_var.h>
extern driver_t* DRIVER_MODULE_NAME(rtwn_pci, pci);
extern driver_t* DRIVER_MODULE_NAME(rtwn_usb, uhub);
HAIKU_FBSD_WLAN_DRIVERS_GLUE(realtekwifi)
HAIKU_DRIVER_REQUIREMENTS(FBSD_WLAN);
HAIKU_FIRMWARE_VERSION(0);
HAIKU_FIRMWARE_NAME_MAP({
{"rtwn-rtl8188eefw", "rtwn-rtl8188eefw.ucode"},
{"rtwn-rtl8188eufw", "rtwn-rtl8188eufw.ucode"},
{"rtwn-rtl8192cfwE", "rtwn-rtl8192cfwE.ucode"},
{"rtwn-rtl8192cfwE_B", "rtwn-rtl8192cfwE_B.ucode"},
{"rtwn-rtl8192cfwU", "rtwn-rtl8192cfwU.ucode"},
{"rtwn-rtl8192cfwT", "rtwn-rtl8192cfwT.ucode"},
{"rtwn-rtl8192eufw", "rtwn-rtl8192eufw.ucode"},
{"rtwn-rtl8812aufw", "rtwn-rtl8812aufw.ucode"},
{"rtwn-rtl8821aufw", "rtwn-rtl8821aufw.ucode"},
});
NO_HAIKU_FBSD_MII_DRIVER();
NO_HAIKU_REENABLE_INTERRUPTS();
status_t
__haiku_handle_fbsd_drivers_list(status_t (*handler)(driver_t *[], driver_t *[]))
{
driver_t *pci_drivers[] = {
DRIVER_MODULE_NAME(rtwn_pci, pci),
NULL
};
driver_t *usb_drivers[] = {
DRIVER_MODULE_NAME(rtwn_usb, uhub),
NULL
};
return (*handler)(pci_drivers, usb_drivers);
}
int
HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
{
struct rtwn_pci_softc* pc = (struct rtwn_pci_softc*)device_get_softc(dev);
int32_t status, tx_rings;
status = rtwn_pci_get_intr_status(pc, &tx_rings);
if (status == 0 && tx_rings == 0)
return 0;
atomic_set(&pc->pc_intr_status, status);
atomic_set(&pc->pc_intr_tx_rings, tx_rings);
return 1;
}
| 23.855263 | 81 | 0.742416 |
faf83ebbc10868f587561ccfceb6304e6ae2ada8 | 10,251 | h | C | inc/print_program.h | glaba/glc | f262ee29594da9cee3ddfb476baa4a300d0eace4 | [
"MIT"
] | null | null | null | inc/print_program.h | glaba/glc | f262ee29594da9cee3ddfb476baa4a300d0eace4 | [
"MIT"
] | null | null | null | inc/print_program.h | glaba/glc | f262ee29594da9cee3ddfb476baa4a300d0eace4 | [
"MIT"
] | null | null | null | #pragma once
#include "ast.h"
#include "visitor.h"
#include <string>
#include <type_traits>
class print_program {
public:
print_program(ast::program& program) : program(program) {}
auto get_output() -> std::string {
return get_output_for_node(program);
}
template <typename CustomPrinter>
auto get_output(CustomPrinter*** cp = nullptr) -> std::string {
return get_output_for_node<ast::program, CustomPrinter>(program);
}
template <typename T>
auto get_output_for_node(T& v) -> std::string {
return get_output_for_node<T, void>(v);
}
template <typename T, typename CustomPrinter>
auto get_output_for_node(T& v, CustomPrinter*** cp = nullptr) -> std::string {
return print<CustomPrinter>(v);
}
private:
template <typename T, typename AstNode, typename = void>
struct has_printer : std::false_type {};
template <typename T, typename AstNode>
struct has_printer<T, AstNode,
std::void_t<decltype(std::declval<T>()(std::declval<print_program&>(), std::declval<AstNode&>()))>> : std::true_type {};
template <typename CustomPrinter, typename T, typename... Args>
auto print(T& v, Args... args) -> std::string {
if constexpr (std::is_same<CustomPrinter, void>::value) {
return print_impl<CustomPrinter>(v, args...);
} else {
if constexpr (has_printer<CustomPrinter, T>::value) {
return CustomPrinter()(*this, v);
} else {
return print_impl<CustomPrinter>(v, args...);
}
}
}
template <typename CustomPrinter> auto print_impl(ast::val_bool& v) -> std::string {
return v.value ? "true" : "false";
}
template <typename CustomPrinter> auto print_impl(ast::val_float& v) -> std::string {
return std::to_string(v.value);
}
template <typename CustomPrinter> auto print_impl(ast::val_int& v) -> std::string {
return std::to_string(v.value);
}
template <typename CustomPrinter> auto print_impl(ast::variable_type& v) -> std::string {
switch (v.type) {
case ast::type_enum::BOOL:
return "bool";
case ast::type_enum::INT:
return "int<" + std::to_string(v.min) + ", " + std::to_string(v.max) + ">";
case ast::type_enum::FLOAT:
return "float";
default:
assert(false);
}
}
template <typename CustomPrinter> auto print_impl(ast::variable_decl& v) -> std::string {
return v.name + " : " + print<CustomPrinter>(*v.type);
}
template <typename CustomPrinter> auto print_impl(ast::properties& v) -> std::string {
auto output = std::string("\tproperties {\n");
for (size_t i = 0; i < v.variable_declarations.size(); i++) {
output += "\t\t" + print<CustomPrinter>(*v.variable_declarations[i]);
if (i < v.variable_declarations.size() - 1) {
output += ",";
}
output += "\n";
}
output += "\t}\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::field& v) -> std::string {
auto output = std::string();
std::visit(ast::overloaded {
[&] (ast::this_unit _) { output = "this"; },
[&] (ast::type_unit _) { output = "type"; },
[&] (ast::identifier_unit u) { output = u.identifier; },
}, v.unit);
switch (v.member_op) {
case ast::member_op_enum::BUILTIN: output += "::"; break;
case ast::member_op_enum::CUSTOM: output += "."; break;
case ast::member_op_enum::LANGUAGE: output += "->"; break;
default: assert(false);
}
output += v.field_name;
return output;
}
template <typename OpNode, char Op, typename CustomPrinter>
auto print_binary_op(OpNode& v) -> std::string {
auto output = "(" + print<CustomPrinter>(*v.expr_1);
output += " " + std::string(1, Op) + " ";
output += print<CustomPrinter>(*v.expr_2) + ")";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::add& v) -> std::string {
return print_binary_op<ast::add, '+', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::mul& v) -> std::string {
return print_binary_op<ast::mul, '*', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::sub& v) -> std::string {
return print_binary_op<ast::sub, '-', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::div& v) -> std::string {
return print_binary_op<ast::div, '/', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::mod& v) -> std::string {
return print_binary_op<ast::mod, '%', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::exp& v) -> std::string {
return print_binary_op<ast::exp, '^', CustomPrinter>(v);
}
template <typename CustomPrinter> auto print_impl(ast::arithmetic_value& v) -> std::string {
auto output = std::string();
std::visit(ast::overloaded {
[&] (std::unique_ptr<ast::field>& val) { output = print<CustomPrinter>(*val); },
[&] (long val) { output = std::to_string(val); },
[&] (double val) { output = std::to_string(val); }
}, v.value);
return output;
}
template <typename CustomPrinter> auto print_impl(ast::arithmetic& v) -> std::string {
auto output = std::string("(");
std::visit([&] (auto& val) {
output += print<CustomPrinter>(*val);
}, v.expr);
output += ")";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::comparison& v) -> std::string {
auto output = std::string();
output += print<CustomPrinter>(*v.lhs);
switch (v.comparison_type) {
case ast::comparison_enum::EQ: output += " == "; break;
case ast::comparison_enum::NEQ: output += " != "; break;
case ast::comparison_enum::GT: output += " > "; break;
case ast::comparison_enum::LT: output += " < "; break;
case ast::comparison_enum::GTE: output += " >= "; break;
case ast::comparison_enum::LTE: output += " <= "; break;
default: assert(false);
}
output += "(" + print<CustomPrinter>(*v.rhs) + ")";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::and_op& v) -> std::string {
return "(" + print<CustomPrinter>(*v.expr_1) + " and " + print<CustomPrinter>(*v.expr_2) + ")";
}
template <typename CustomPrinter> auto print_impl(ast::or_op& v) -> std::string {
return "(" + print<CustomPrinter>(*v.expr_1) + " or " + print<CustomPrinter>(*v.expr_2) + ")";
}
template <typename CustomPrinter> auto print_impl(ast::negated& v) -> std::string {
return "not " + print<CustomPrinter>(*v.expr);
}
template <typename CustomPrinter> auto print_impl(ast::logical& v) -> std::string {
auto output = std::string("(");
std::visit([&] (auto& val) {
output += print<CustomPrinter>(*val);
}, v.expr);
output += ")";
return output;
}
auto print_indent(size_t indent = 0) -> std::string {
auto output = std::string();
for (size_t i = 0; i < indent; i++) {
output += "\t";
}
return output;
}
template <typename CustomPrinter> auto print_impl(ast::assignment& v, size_t indent = 0) -> std::string {
auto output = print_indent(indent) + print<CustomPrinter>(*v.lhs) + " = ";
std::visit([&] (auto& rhs) {
output += print<CustomPrinter>(*rhs);
}, v.rhs);
output += ";\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::continuous_if& v, size_t indent = 0) -> std::string {
auto output = print_indent(indent) + "if " + print<CustomPrinter>(*v.condition) + " {\n";
output += print<CustomPrinter>(*v.body, indent + 1);
output += print_indent(indent) + "}\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::transition_if& v, size_t indent = 0) -> std::string {
auto output = print_indent(indent) + "if becomes " + print<CustomPrinter>(*v.condition) + " {\n";
output += print<CustomPrinter>(*v.body, indent + 1);
output += print_indent(indent) + "}\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::for_in& v, size_t indent = 0) -> std::string {
auto output = print_indent(indent) + "for " + v.variable + " in range " + std::to_string(v.range) +
" of ";
std::visit(ast::overloaded {
[&] (ast::this_unit _) { output += "this"; },
[&] (ast::type_unit _) { output += "type"; },
[&] (ast::identifier_unit u) { output += u.identifier; },
}, v.range_unit);
if (!v.traits.empty()) {
output += " with trait ";
for (size_t i = 0; i < v.traits.size(); i++) {
output += v.traits[i];
if (i < v.traits.size() - 1) {
output += ", ";
}
}
}
output += " {\n";
output += print<CustomPrinter>(*v.body, indent + 1);
output += print_indent(indent) + "}\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::always_body& v, size_t indent = 0) -> std::string {
auto output = std::string();
for (auto& expr : v.exprs) {
std::visit([&] (auto& n) {
output += print<CustomPrinter>(*n, indent);
}, expr);
}
return output;
}
template <typename CustomPrinter> auto print_impl(ast::trait& v) -> std::string {
auto output = "trait " + v.name + " {\n";
output += print<CustomPrinter>(*v.props);
output += "\n\talways {\n" + print<CustomPrinter>(*v.body, 2);
output += "\t}\n";
output += "}\n\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::trait_initializer& v) -> std::string {
auto output = v.name;
if (!v.initial_values.empty()) {
output += "(";
for (auto it = v.initial_values.begin(); it != v.initial_values.end();) {
auto& [property, value] = *it;
output += property + " = ";
std::visit(ast::overloaded {
[&] (bool val) { output += val ? "true" : "false"; },
[&] (double val) { output += std::to_string(val); },
[&] (long val) { output += std::to_string(val); }
}, value);
if (++it != v.initial_values.end()) {
output += ", ";
}
}
output += ")";
}
return output;
}
template <typename CustomPrinter> auto print_impl(ast::unit_traits& v) -> std::string {
auto output = "unit " + v.name + " : ";
for (auto& trait_init : v.traits) {
output += print<CustomPrinter>(*trait_init);
}
output += ";\n";
return output;
}
template <typename CustomPrinter> auto print_impl(ast::program& v) -> std::string {
auto output = std::string();
for (auto& trait : v.traits) {
output += print<CustomPrinter>(*trait);
}
for (auto& unit_trait : v.all_unit_traits) {
output += print<CustomPrinter>(*unit_trait);
}
return output;
}
ast::program& program;
};
| 31.835404 | 122 | 0.63428 |
fafa08a6d192fa6423cac360a4fbe207b27257d8 | 2,441 | c | C | src/nes.c | majestic53/nes | 5226625c39340486b18e7a66e4f40f8021fe0f3f | [
"MIT"
] | 3 | 2021-03-17T16:53:50.000Z | 2022-01-26T12:13:24.000Z | src/nes.c | majestic53/nes | 5226625c39340486b18e7a66e4f40f8021fe0f3f | [
"MIT"
] | null | null | null | src/nes.c | majestic53/nes | 5226625c39340486b18e7a66e4f40f8021fe0f3f | [
"MIT"
] | null | null | null | /**
* NES
* Copyright (C) 2021-2022 David Jolly
*
* 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.
*/
#include "../include/bus.h"
#include "../include/service.h"
/**
* NES struct
*/
typedef struct {
bool initialized;
} nes_lib_t;
/**
* NES context
*/
static nes_lib_t g_nes = {};
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int
nes_initialize(
__in const nes_t *configuration
)
{
int result;
if((result = nes_bus_initialize(configuration->data, configuration->length)) != NES_SUCC) {
goto exit;
}
if((result = nes_service_initialize(configuration->title, configuration->scale, configuration->fullscreen, configuration->filter)) != NES_SUCC) {
goto exit;
}
g_nes.initialized = true;
exit:
return result;
}
int
nes_initialized(void)
{
return g_nes.initialized ? NES_SUCC : NES_ERR;
}
int
nes_run(void)
{
int result = NES_SUCC;
if(!g_nes.initialized) {
result = NES_ERR_SET(NES_ERR, "Invalid state -- %s", "Uninitialized");
goto exit;
}
while(nes_service_poll()) {
while(!nes_bus_cycle());
if((result = nes_service_show()) != NES_SUCC) {
goto exit;
}
}
exit:
return result;
}
void
nes_uninitialize(void)
{
nes_service_uninitialize();
nes_bus_uninitialize();
memset(&g_nes, 0, sizeof(g_nes));
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
| 23.931373 | 149 | 0.69111 |
fafccefe6db6f981233abe0ecada3e263dff161b | 1,283 | h | C | src/TestArray.h | slvbsp2009/NAMD_XLNX_ACCEL | d1afd22915986fa24f8a4b6945d55b9b7b0ca948 | [
"BSD-3-Clause"
] | null | null | null | src/TestArray.h | slvbsp2009/NAMD_XLNX_ACCEL | d1afd22915986fa24f8a4b6945d55b9b7b0ca948 | [
"BSD-3-Clause"
] | null | null | null | src/TestArray.h | slvbsp2009/NAMD_XLNX_ACCEL | d1afd22915986fa24f8a4b6945d55b9b7b0ca948 | [
"BSD-3-Clause"
] | null | null | null | #ifndef TEST_ARRAY_H
#define TEST_ARRAY_H
#include <type_traits>
void NAMD_die(const char *);
int TestArray_write_helper(
const char *filename,
const char *label,
const void *array,
int elemsize,
int length,
int isfp
);
/**
* Write an array to file for later analysis.
* The array type needs to be a standard arithmetic type,
* as designated true by std::is_arithmetic<T>.
*
* File format is:
* - label is padded to 116 characters including null terminator
* - nonzero 4-byte int if array is floating point
* - number of bytes per element stored as 4-byte int
* - length of the array stored as 4-byte int
* - the array data
*
* Returns zero for success or nonzero for error.
*/
template <typename T>
int TestArray_write(
const char *filename, ///< save to file name
const char *label, ///< label for array (truncated to 120 characters)
const T *array, ///< points to the array to save
int length ///< length of the array
) {
if ( ! std::is_arithmetic<T>::value ) {
NAMD_die("Called TestArray_write with non-aritmetic type");
}
int isfp = std::is_floating_point<T>::value;
return TestArray_write_helper(filename, label,
(const void *)array, sizeof(T), length, isfp);
}
#endif
| 27.297872 | 77 | 0.673422 |
fafd5325e6fad2a366376a32d215044e07efbd9c | 4,369 | c | C | mods/sauce/sauce.c | Ckath/k88 | c9640ba4eafeda9187db915579c58584e00e9221 | [
"MIT"
] | 5 | 2020-07-19T00:04:23.000Z | 2021-06-25T05:38:39.000Z | mods/sauce/sauce.c | Ckath/k88 | c9640ba4eafeda9187db915579c58584e00e9221 | [
"MIT"
] | 12 | 2020-07-12T22:07:32.000Z | 2021-06-08T20:00:07.000Z | mods/sauce/sauce.c | Ckath/k88 | c9640ba4eafeda9187db915579c58584e00e9221 | [
"MIT"
] | 1 | 2021-01-11T23:50:55.000Z | 2021-01-11T23:50:55.000Z | #include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdio.h>
#include <curl/curl.h>
#include "../../utils/curl.h"
#include "../../utils/strutils.h"
/* required */
#include "../modtape.h"
#include "../../core/modules.h"
#include "../../core/log.h"
#include "../../core/irc.h"
static void
json_item(char *dest, char *json, char *item, char *end)
{
char *start = strstr(json, item);
if (!start) {
dest[0] = '\0';
return;
}
start += strlen(item)+1;
strncpy(dest, start, BUFSIZE-1);
char *e = strstr(dest, end);
if (e) {
e[0] = '\0';
}
return;
}
static void
parse_results(char *results)
{
/* in case you're fixing index_id handling uncomment this */
/* log_info("returned results: '%s'\n", results); */
char score[BUFSIZE] = { '\0' };
char index[BUFSIZE] = { '\0' };
json_item(score, results, "similarity\":", "\",\"");
json_item(index, results, "index_id\"", "\",\"");
int index_id = strtoul(index, NULL, 0);
int score_grade = strtoul(score, NULL, 0);
score_grade = score_grade > 60 ? 3 : score_grade > 40 ? 7 : 4;
switch (index_id) { /* cursed switchcase of bad result type handling */
case 21:; /* anime */
char show[BUFSIZE] = { '\0' };
char ep[BUFSIZE] = { '\0' };
char time[BUFSIZE] = { '\0' };
json_item(show, results, "source\":", "\",");
json_item(ep, results, "part\":", "\",");
json_item(time, results, "est_time\":", "\"");
strunescape(show);
strunescape(time);
sprintf(results, "%d%s%%: %s of %s at %s",
score_grade, score, ep, show, time);
break;
case 2:; /* game */
char game[BUFSIZE] = { '\0' };
char company[BUFSIZE] = { '\0' };
json_item(game, results, "title\":", "\"");
json_item(company, results, "company\":", "\"");
strunescape(game);
strunescape(company);
sprintf(results, "%d%s%%: %s by %s",
score_grade, score, game, company);
break;
case 18: /* doujin */
case 38:;
char doujin[BUFSIZE] = { '\0' };
char creator[BUFSIZE] = { '\0' };
json_item(doujin, results, "source\":", "\"");
json_item(creator, results, "creator\":", "]");
strrplc(creator, "[", "");
strrplc(creator, "\"", "");
strrplc(creator, ",", "/");
strunescape(creator);
strunescape(doujin);
sprintf(results, "%d%s%%: %s by %s",
score_grade, score, doujin, creator);
break;
default:;
char url[BUFSIZE] = { '\0' };
char title[BUFSIZE] = { '\0' };
json_item(url, results, "ext_urls\":[", "\"");
json_item(title, results, "title\":", "\"");
if (!url[0] && !title[0]) { /* time to give up */
sprintf(results, "%d%s%%: parser too shit to deal with result (id #%d)",
score_grade, score, index_id);
break;
}
strunescape(url);
if (title[0]) {
strunescape(title);
sprintf(results, "%d%s%%: %s %s",
score_grade, score, title, url);
} else { /* no title, try to save it by going for source */
char source[BUFSIZE] = { '\0' };
json_item(source, results, "source\":", "\"");
strunescape(source);
sprintf(results, "%d%s%%: %s %s",
score_grade, score, source, url);
}
break;
}
}
static void
handle_cmdmsg(msg_info *mi, char *msg)
{
if (strncmp(msg, "sauce ", 6)) {
return;
}
/* curl is stupid and breaks my sockets if I init it any sooner */
curl_init();
CURL *curl = curl_easy_init();
/* build url */
char url[BUFSIZE];
chunk res = { .memory = malloc(1), .size = 0 };
char *req = curl_easy_escape(curl, strchr(msg, ' ')+1, strlen(strchr(msg, ' ')+1));
sprintf(url, "https://saucenao.com/search.php?api_key=%s&output_type=2&db=999&url=%s",
getenv("SAUCE_APPID"), req);
/* configure curl request */
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_wrcb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res);
/* handle result */
CURLcode r = curl_easy_perform(curl);
if (r != CURLE_OK) {
send_privmsg("curl error: %s", curl_easy_strerror(r));
curl_reset();
} else {
char results[BUFSIZE] = { '\0' };
json_item(results, res.memory, "results\":[{", "}}");
if (!results[0]) {
json_item(results, res.memory, "message\":", "\"}}");
send_privmsg("error: %s\n", results);
} else {
parse_results(results);
send_privmsg("%s", results);
}
}
/* cleanup */
curl_easy_cleanup(curl);
curl_free(req);
free(res.memory);
}
void
sauce_init()
{
mods_new("sauce", true);
mods_cmdmsg_handler(handle_cmdmsg);
}
| 26.803681 | 87 | 0.600824 |
4f0077d693b5ea8fb91f66eab23a9edfacaa1bfa | 169 | h | C | pcc-translate/TranslatePCCToMLIR.h | veselypeta/protogen-mlir | 84b75bb440fd2009487f6b247f795964a2cbb9d1 | [
"Apache-2.0"
] | null | null | null | pcc-translate/TranslatePCCToMLIR.h | veselypeta/protogen-mlir | 84b75bb440fd2009487f6b247f795964a2cbb9d1 | [
"Apache-2.0"
] | null | null | null | pcc-translate/TranslatePCCToMLIR.h | veselypeta/protogen-mlir | 84b75bb440fd2009487f6b247f795964a2cbb9d1 | [
"Apache-2.0"
] | null | null | null | #pragma once
#include "mlir/Translation.h"
#include "mlir/Target/LLVMIR/ModuleTranslation.h"
namespace mlir {
void registerPCCToMlirTranslation();
} // namespace mlir | 18.777778 | 49 | 0.781065 |
4f0122e32b8e9e945044b3e4b0cb15eaf1b691a6 | 4,131 | h | C | edk2/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsApi.h | awwiniot/Aw1689UEFI | 968033cea6432cf3121ef933f2e7f073d11363fb | [
"MIT"
] | 21 | 2016-11-20T16:47:01.000Z | 2022-03-04T12:10:19.000Z | edk2/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsApi.h | awwiniot/Aw1689UEFI | 968033cea6432cf3121ef933f2e7f073d11363fb | [
"MIT"
] | 3 | 2017-01-07T18:05:32.000Z | 2017-06-09T05:47:20.000Z | edk2/ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsApi.h | awwiniot/Aw1689UEFI | 968033cea6432cf3121ef933f2e7f073d11363fb | [
"MIT"
] | 8 | 2017-01-09T07:44:28.000Z | 2020-05-10T00:09:54.000Z | /** @file
*
* Copyright (c) 2012-2014, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
* which accompanies this distribution. The full text of the license may be found at
* http://opensource.org/licenses/bsd-license.php
*
* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*
**/
#ifndef __BOOTMON_FS_API_H
#define __BOOTMON_FS_API_H
#include <Protocol/SimpleFileSystem.h>
EFI_STATUS
BootMonFsDiscoverNextImage (
IN BOOTMON_FS_INSTANCE *Flash,
IN EFI_LBA *LbaStart,
OUT HW_IMAGE_DESCRIPTION *Image
);
EFI_STATUS
BootMonFsInitialize (
IN BOOTMON_FS_INSTANCE *Instance
);
UINT32
BootMonFsChecksum (
IN VOID *Data,
IN UINT32 Size
);
EFI_STATUS
BootMonFsComputeFooterChecksum (
IN OUT HW_IMAGE_DESCRIPTION *Footer
);
EFIAPI
EFI_STATUS
OpenBootMonFsOpenVolume (
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
OUT EFI_FILE_PROTOCOL **Root
);
UINT32
BootMonFsGetImageLength (
IN BOOTMON_FS_FILE *File
);
UINTN
BootMonFsGetPhysicalSize (
IN BOOTMON_FS_FILE* File
);
EFI_STATUS
BootMonFsCreateFile (
IN BOOTMON_FS_INSTANCE *Instance,
OUT BOOTMON_FS_FILE **File
);
EFIAPI
EFI_STATUS
BootMonFsGetInfo (
IN EFI_FILE_PROTOCOL *This,
IN EFI_GUID *InformationType,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
EFIAPI
EFI_STATUS
BootMonFsReadDirectory (
IN EFI_FILE_PROTOCOL *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
EFIAPI
EFI_STATUS
BootMonFsFlushDirectory (
IN EFI_FILE_PROTOCOL *This
);
EFIAPI
EFI_STATUS
BootMonFsFlushFile (
IN EFI_FILE_PROTOCOL *This
);
EFIAPI
EFI_STATUS
BootMonFsCloseFile (
IN EFI_FILE_PROTOCOL *This
);
EFIAPI
EFI_STATUS
BootMonFsOpenFile (
IN EFI_FILE_PROTOCOL *This,
OUT EFI_FILE_PROTOCOL **NewHandle,
IN CHAR16 *FileName,
IN UINT64 OpenMode,
IN UINT64 Attributes
);
EFIAPI
EFI_STATUS
BootMonFsReadFile (
IN EFI_FILE_PROTOCOL *This,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
EFIAPI
EFI_STATUS
BootMonFsSetDirPosition (
IN EFI_FILE_PROTOCOL *This,
IN UINT64 Position
);
EFIAPI
EFI_STATUS
BootMonFsGetPosition (
IN EFI_FILE_PROTOCOL *This,
OUT UINT64 *Position
);
EFIAPI
EFI_STATUS
BootMonFsWriteFile (
IN EFI_FILE_PROTOCOL *This,
IN OUT UINTN *BufferSize,
IN VOID *Buffer
);
EFIAPI
EFI_STATUS
BootMonFsDeleteFail (
IN EFI_FILE_PROTOCOL *This
);
EFIAPI
EFI_STATUS
BootMonFsDelete (
IN EFI_FILE_PROTOCOL *This
);
EFIAPI
EFI_STATUS
BootMonFsSetPosition (
IN EFI_FILE_PROTOCOL *This,
IN UINT64 Position
);
EFIAPI
EFI_STATUS
BootMonFsGetPosition(
IN EFI_FILE_PROTOCOL *This,
OUT UINT64 *Position
);
//
// UNSUPPORTED OPERATIONS
//
EFIAPI
EFI_STATUS
BootMonFsGetPositionUnsupported (
IN EFI_FILE_PROTOCOL *This,
OUT UINT64 *Position
);
EFIAPI
EFI_STATUS
BootMonFsSetInfo (
IN EFI_FILE_PROTOCOL *This,
IN EFI_GUID *InformationType,
IN UINTN BufferSize,
IN VOID *Buffer
);
//
// Directory API
//
EFI_STATUS
BootMonFsOpenDirectory (
OUT EFI_FILE_PROTOCOL **NewHandle,
IN CHAR16 *FileName,
IN BOOTMON_FS_INSTANCE *Volume
);
//
// Internal API
//
EFI_STATUS
BootMonGetFileFromAsciiFileName (
IN BOOTMON_FS_INSTANCE *Instance,
IN CHAR8* AsciiFileName,
OUT BOOTMON_FS_FILE **File
);
EFI_STATUS
BootMonGetFileFromPosition (
IN BOOTMON_FS_INSTANCE *Instance,
IN UINTN Position,
OUT BOOTMON_FS_FILE **File
);
#endif
| 19.036866 | 86 | 0.652626 |
4f03440d10afc0c6e27b658276942d88dd6bb665 | 1,267 | h | C | macOS/10.13/Quartz.framework/QLTransitionView.h | onmyway133/Runtime-Headers | e9b80e7ab9103f37ad421ad6b8b58ee06369d21f | [
"MIT"
] | 30 | 2016-10-09T20:13:00.000Z | 2022-01-24T04:14:57.000Z | macOS/10.13/Quartz.framework/QLTransitionView.h | onmyway133/Runtime-Headers | e9b80e7ab9103f37ad421ad6b8b58ee06369d21f | [
"MIT"
] | null | null | null | macOS/10.13/Quartz.framework/QLTransitionView.h | onmyway133/Runtime-Headers | e9b80e7ab9103f37ad421ad6b8b58ee06369d21f | [
"MIT"
] | 7 | 2017-08-29T14:41:25.000Z | 2022-01-19T17:14:54.000Z | /* Generated by RuntimeBrowser
Image: /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/QuickLookUI
*/
@interface QLTransitionView : NSView {
struct CGRect {
struct CGPoint {
double x;
double y;
} origin;
struct CGSize {
double width;
double height;
} size;
} _transitionFrame;
NSImage * _transitionImage;
}
@property (atomic, readwrite) struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; } transitionFrame;
@property (nonatomic, readwrite, retain) NSImage *transitionImage;
- (void)dealloc;
- (void)drawRect:(struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })arg1;
- (BOOL)isOpaque;
- (void)setTransitionFrame:(struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })arg1;
- (void)setTransitionImage:(id)arg1;
- (struct CGRect { struct CGPoint { double x_1_1_1; double x_1_1_2; } x1; struct CGSize { double x_2_1_1; double x_2_1_2; } x2; })transitionFrame;
- (id)transitionImage;
@end
| 40.870968 | 173 | 0.689029 |
4f0a47ada68251fbd8f237152b7aa5e886594840 | 1,021 | c | C | lib/common/rm.c | Dream-Imperium/lcore | 1ac61cc4314ebecbc980c1850db2f4bb9513c24e | [
"Unlicense"
] | 1 | 2021-05-10T00:36:10.000Z | 2021-05-10T00:36:10.000Z | lib/common/rm.c | Dream-Imperium/lcore | 1ac61cc4314ebecbc980c1850db2f4bb9513c24e | [
"Unlicense"
] | null | null | null | lib/common/rm.c | Dream-Imperium/lcore | 1ac61cc4314ebecbc980c1850db2f4bb9513c24e | [
"Unlicense"
] | null | null | null | #include <tertium/cpu.h>
#include <tertium/std.h>
#include "common.h"
ctype_status
remove(char **argv, uint opts)
{
ctype_dir dir;
ctype_dent *p;
ctype_status r;
if (c_dir_open(&dir, argv, 0, nil) < 0)
c_err_die(1, "c_dir_open");
r = 0;
while ((p = c_dir_read(&dir))) {
if (opts & RM_IFLAG) {
c_ioq_fmt(ioq2, "%s: remove '%s'? ",
c_std_getprogname(), p->path);
c_ioq_flush(ioq2);
if (yesno())
continue;
}
switch (p->info) {
case C_FSD:
if (!(opts & RM_RFLAG)) {
c_dir_set(&dir, p, C_FSSKP);
r = c_err_warnx("%s: %r", p->path, C_EISDIR);
continue;
}
break;
case C_FSDP:
if (!(opts & RM_RFLAG))
continue;
if (c_sys_rmdir(p->path) < 0)
r = c_err_warn("c_sys_rmdir %s", p->path);
break;
case C_FSERR:
r = c_err_warnx("%s: %r", p->path, p->err);
break;
default:
if (c_sys_unlink(p->path) < 0 &&
(!(opts & RM_FFLAG) || errno != C_ENOENT))
r = c_err_warn("c_sys_unlink %s", p->path);
}
}
c_dir_close(&dir);
return r;
}
| 20.019608 | 49 | 0.578844 |
4f0c28e3f99ac248c9cbcfa059c2c8883b80b424 | 79 | c | C | locale/_ic_pctype.c | repo-mirrors/mingw-w64-ironcrate | d0f642aab2d22c38568cabdcc35dbe725816bb09 | [
"MIT-0"
] | null | null | null | locale/_ic_pctype.c | repo-mirrors/mingw-w64-ironcrate | d0f642aab2d22c38568cabdcc35dbe725816bb09 | [
"MIT-0"
] | null | null | null | locale/_ic_pctype.c | repo-mirrors/mingw-w64-ironcrate | d0f642aab2d22c38568cabdcc35dbe725816bb09 | [
"MIT-0"
] | null | null | null | #include <ic_stdc.h>
const unsigned short *_ic_pctype = &__ic_newctype[128];
| 15.8 | 55 | 0.746835 |
4f0c91c3bae21d1a0ae503e08f5e67bd85c4a94c | 2,300 | c | C | qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c | YamiND/RocketMinsta | 2e15176cdb4427856cb40f3f637cfd14c1c29fbc | [
"WTFPL"
] | null | null | null | qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c | YamiND/RocketMinsta | 2e15176cdb4427856cb40f3f637cfd14c1c29fbc | [
"WTFPL"
] | null | null | null | qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c | YamiND/RocketMinsta | 2e15176cdb4427856cb40f3f637cfd14c1c29fbc | [
"WTFPL"
] | null | null | null | #ifdef INTERFACE
CLASS(NexuizWeaponsDialog) EXTENDS(NexuizDialog)
METHOD(NexuizWeaponsDialog, toString, string(entity))
METHOD(NexuizWeaponsDialog, fill, void(entity))
METHOD(NexuizWeaponsDialog, showNotify, void(entity))
ATTRIB(NexuizWeaponsDialog, title, string, "Weapon settings")
ATTRIB(NexuizWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
ATTRIB(NexuizWeaponsDialog, intendedWidth, float, 0.35)
ATTRIB(NexuizWeaponsDialog, rows, float, 16)
ATTRIB(NexuizWeaponsDialog, columns, float, 4)
ATTRIB(NexuizWeaponsDialog, weaponsList, entity, NULL)
ENDCLASS(NexuizWeaponsDialog)
#endif
#ifdef IMPLEMENTATION
void showNotifyNexuizWeaponsDialog(entity me)
{
loadAllCvars(me);
}
string toStringNexuizWeaponsDialog(entity me)
{
return me.weaponsList.toString(me.weaponsList);
}
void fillNexuizWeaponsDialog(entity me)
{
entity e;
float h0, h;
h = me.rows - 7;
me.TR(me);
me.TD(me, 1, 4, makeNexuizTextLabel(0, "Weapon priority list:"));
me.TR(me);
h0 = me.currentRow;
me.TD(me, h, 3, e = me.weaponsList = makeNexuizWeaponsList());
me.gotoRC(me, h0 + h / 2 - 1, 3);
me.TD(me, 1, 1, e = makeNexuizButton("Up", '0 0 0'));
e.onClick = WeaponsList_MoveUp_Click;
e.onClickEntity = me.weaponsList;
me.gotoRC(me, h0 + h / 2, 3);
me.TD(me, 1, 1, e = makeNexuizButton("Down", '0 0 0'));
e.onClick = WeaponsList_MoveDown_Click;
e.onClickEntity = me.weaponsList;
me.gotoRC(me, h0 + h, 0);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_weaponpriority_useforcycling", "Use priority list for weapon cycling"));
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "r_drawviewmodel", "Draw 1st person weapon model"));
me.TR(me);
me.TDempty(me, 0.5);
me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "cl_gunalign", "4", "Left align"));
setDependent(e, "r_drawviewmodel", 1, 1);
me.TD(me, 1, 2, e = makeNexuizRadioButton(1, "cl_gunalign", "3", "Right align"));
setDependent(e, "r_drawviewmodel", 1, 1);
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "v_flipped", "Flip view horizontally"));
me.TR(me);
me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
#endif
| 35.384615 | 120 | 0.702609 |
4f0ce1fcaa5892eca4720dbeedb9f1ca57e0b8c4 | 1,200 | c | C | example/2.nested.c | dearblue/micro-co | b403a8d1066c429c231f48f215b048ca7f6a9017 | [
"CC0-1.0"
] | null | null | null | example/2.nested.c | dearblue/micro-co | b403a8d1066c429c231f48f215b048ca7f6a9017 | [
"CC0-1.0"
] | null | null | null | example/2.nested.c | dearblue/micro-co | b403a8d1066c429c231f48f215b048ca7f6a9017 | [
"CC0-1.0"
] | null | null | null | /*
* This code is under public domain (CC0)
* <https://creativecommons.org/publicdomain/zero/1.0/>.
*
* To the extent possible under law, dearblue has waived all copyright
* and related or neighboring rights to this work.
*
* dearblue <dearblue@users.noreply.github.com>
*/
#include <micro-co.h>
#include <stdio.h>
#include <stdlib.h>
static int
test_child(co_state_t *co)
{
static int i;
co_begin(co);
for (i = 1; i < 5; i ++) {
co_yield(i * 10);
}
co_end();
return -1;
}
static int
test_top(co_state_t *co, co_state_t *child)
{
static int i = 0;
int t;
co_begin(co);
for (; i < 2; i ++) {
co_yield(i);
}
for (; i < 5; i ++) {
*child = CO_INIT;
for (;;) {
t = test_child(child);
if (t < 0) {
break;
}
co_yield(i + t);
}
}
for (; i < 8; i ++) {
co_yield(i);
}
co_end();
return -1;
}
int
main(int argc, char *argv[])
{
co_state_t co = CO_INIT, child = CO_INIT;
int i = 0, n;
while ((n = test_top(&co, &child)) >= 0) {
printf("%3d: %3d\n", i ++, n);
}
return 0;
}
| 15.584416 | 70 | 0.4975 |
4f0d694f3771a28b8adf44e71543f341de198153 | 3,482 | c | C | u2f-server/error.c | frozencemetery/libu2f-server | 2850d79d7f377c07808506cacde3888f18d4a678 | [
"BSD-2-Clause"
] | 108 | 2015-01-28T00:03:30.000Z | 2021-11-16T21:11:16.000Z | u2f-server/error.c | frozencemetery/libu2f-server | 2850d79d7f377c07808506cacde3888f18d4a678 | [
"BSD-2-Clause"
] | 31 | 2015-09-07T01:03:50.000Z | 2020-09-03T12:54:01.000Z | u2f-server/error.c | frozencemetery/libu2f-server | 2850d79d7f377c07808506cacde3888f18d4a678 | [
"BSD-2-Clause"
] | 36 | 2015-05-04T14:29:20.000Z | 2021-11-16T21:11:08.000Z | /*
* Copyright (c) 2014 Yubico AB
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <u2f-server/u2f-server.h>
#define ERR(name, desc) { name, #name, desc }
typedef struct {
int rc;
const char *name;
const char *description;
} err_t;
static const err_t errors[] = {
ERR(U2FS_OK, "Successful return"),
ERR(U2FS_MEMORY_ERROR, "Memory error (e.g., out of memory)"),
ERR(U2FS_JSON_ERROR, "Error in JSON handling"),
ERR(U2FS_BASE64_ERROR, "Base64 error"),
ERR(U2FS_CRYPTO_ERROR, "Crypto error"),
ERR(U2FS_ORIGIN_ERROR, "Origin mismatch"),
ERR(U2FS_CHALLENGE_ERROR, "Challenge error"),
ERR(U2FS_SIGNATURE_ERROR, "Unable to verify signature"),
ERR(U2FS_FORMAT_ERROR, "Format mismatch")
};
/**
* u2fs_strerror:
* @err: error code
*
* Convert return code to human readable string explanation of the
* reason for the particular error code.
*
* This string can be used to output a diagnostic message to the user.
*
* This function is one of few in the library that can be used without
* a successful call to u2fs_global_init().
*
* Return value: Returns a pointer to a statically allocated string
* containing an explanation of the error code @err.
**/
const char *u2fs_strerror(int err)
{
static const char *unknown = "Unknown libu2f-server error";
const char *p;
if (-err < 0 || -err >= (int) (sizeof(errors) / sizeof(errors[0])))
return unknown;
p = errors[-err].description;
if (!p)
p = unknown;
return p;
}
/**
* u2fs_strerror_name:
* @err: error code
*
* Convert return code to human readable string representing the error
* code symbol itself. For example, u2fs_strerror_name(%U2FS_OK)
* returns the string "U2FS_OK".
*
* This string can be used to output a diagnostic message to the user.
*
* This function is one of few in the library that can be used without
* a successful call to u2fs_global_init().
*
* Return value: Returns a pointer to a statically allocated string
* containing a string version of the error code @err, or NULL if
* the error code is not known.
**/
const char *u2fs_strerror_name(int err)
{
if (-err < 0 || -err >= (int) (sizeof(errors) / sizeof(errors[0])))
return NULL;
return errors[-err].name;
}
| 32.849057 | 72 | 0.731189 |
4f0fb13cd5592f8a5c097abd8ab8b074ac93388a | 563 | h | C | templates/cocos2d iOS.xctemplate/Classes/AppDelegate.h | n-studio/cocos2d-iphone | 1a2d04444d8a2f4730fc799efcf8e589ea24f7c5 | [
"MIT"
] | 9 | 2016-07-13T23:35:34.000Z | 2021-01-14T19:18:28.000Z | templates/cocos2d iOS.xctemplate/Classes/AppDelegate.h | n-studio/cocos2d-iphone | 1a2d04444d8a2f4730fc799efcf8e589ea24f7c5 | [
"MIT"
] | 2 | 2017-04-11T09:45:32.000Z | 2021-03-03T08:47:01.000Z | templates/cocos2d iOS.xctemplate/Classes/AppDelegate.h | n-studio/cocos2d-iphone | 1a2d04444d8a2f4730fc799efcf8e589ea24f7c5 | [
"MIT"
] | 7 | 2016-08-03T15:30:27.000Z | 2020-05-12T17:12:19.000Z | //
// ___FILENAME___
//
// Created by : ___FULLUSERNAME___
// Project : ___PROJECTNAME___
// Date : ___DATE___
//
// Copyright (c) ___YEAR___ ___ORGANIZATIONNAME___.
// All rights reserved.
//
// -----------------------------------------------------------------
#import <Foundation/Foundation.h>
#import "cocos2d.h"
// -----------------------------------------------------------------------
@interface AppDelegate : CCAppDelegate
// -----------------------------------------------------------------------
@end
| 10.053571 | 74 | 0.381883 |
4f15b350ec439e31d261f9d96fca47d830d49dc1 | 27,262 | h | C | include/splstring.h | Spirrwell/SpirrwellStringLibrary | 09db2477416e2581435d802b73fa3273ed144f43 | [
"MIT"
] | 1 | 2021-03-28T06:14:30.000Z | 2021-03-28T06:14:30.000Z | include/splstring.h | Spirrwell/SpirrwellStringLibrary | 09db2477416e2581435d802b73fa3273ed144f43 | [
"MIT"
] | null | null | null | include/splstring.h | Spirrwell/SpirrwellStringLibrary | 09db2477416e2581435d802b73fa3273ed144f43 | [
"MIT"
] | null | null | null | /*******************************************************************************
* MIT License
*
* Copyright (c) 2021 Spirrwell
*
* 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.
********************************************************************************/
#pragma once
#include <string>
#include <string_view>
#include <algorithm>
#include <memory>
#include <stdexcept>
#include <cstring>
#include <charconv>
#include <vector>
#include <array>
#include <limits>
#include <filesystem>
#include <type_traits>
namespace spl
{
// Note: When searching for substrings, this can be significantly faster than
// std::char_traits<char>::compare() on optimized/release builds, but slower on debug builds.
inline bool compare_equal(const char *str1, const char *str2, std::size_t size)
{
for (std::size_t i = 0; i < size; ++i)
{
if (str1[i] != str2[i])
return false;
}
return true;
}
class string
{
struct buffer_deleter
{
void operator()(char memory[])
{
std::free(memory);
}
};
public:
enum struct split_side
{
left,
right
};
struct iterator_base
{
using iterator_category = std::input_iterator_tag;
using value_type = char;
using difference_type = ptrdiff_t;
using pointer = char*;
using reference = char&;
iterator_base(char *begin) noexcept : mCurrent(begin) {}
iterator_base(const iterator_base &it) noexcept : mCurrent(it.mCurrent) {}
bool operator==(const iterator_base &rhs) const noexcept { return mCurrent == rhs.mCurrent; }
bool operator!=(const iterator_base &rhs) const noexcept { return mCurrent != rhs.mCurrent; }
char &operator*() { return *mCurrent; }
const char &operator*() const { return *mCurrent; }
protected:
char *mCurrent;
};
struct iterator : iterator_base
{
using iterator_base::iterator_base;
iterator &operator++() noexcept
{
++mCurrent;
return *this;
}
iterator &operator--() noexcept
{
--mCurrent;
return *this;
}
iterator operator++(int)
{
iterator retval = *this;
++(*this);
return retval;
}
iterator operator--(int)
{
iterator retval = *this;
--(*this);
return retval;
}
friend iterator operator+(const iterator &lhs, difference_type count)
{
iterator retval = lhs;
retval.mCurrent += count;
return retval;
}
friend iterator operator-(const iterator &lhs, difference_type count)
{
iterator retval = lhs;
retval.mCurrent -= count;
return retval;
}
bool operator<(const iterator &rhs) const noexcept { return mCurrent < rhs.mCurrent; }
bool operator<=(const iterator &rhs) const noexcept { return mCurrent <= rhs.mCurrent; }
bool operator>(const iterator &rhs) const noexcept { return mCurrent > rhs.mCurrent; }
bool operator>=(const iterator &rhs) const noexcept { return mCurrent >= rhs.mCurrent; }
};
struct reverse_iterator : iterator_base
{
using iterator_base::iterator_base;
reverse_iterator &operator++() noexcept
{
--mCurrent;
return *this;
}
reverse_iterator &operator--() noexcept
{
++mCurrent;
return *this;
}
reverse_iterator operator++(int)
{
reverse_iterator retval = *this;
++(*this);
return retval;
}
reverse_iterator operator--(int)
{
reverse_iterator retval = *this;
--(*this);
return retval;
}
friend reverse_iterator operator+(const reverse_iterator &lhs, difference_type count)
{
reverse_iterator retval = lhs;
retval.mCurrent -= count;
return retval;
}
friend reverse_iterator operator-(const reverse_iterator &lhs, difference_type count)
{
reverse_iterator retval = lhs;
retval.mCurrent += count;
return retval;
}
bool operator<(const reverse_iterator &rhs) const noexcept { return mCurrent > rhs.mCurrent; }
bool operator<=(const reverse_iterator &rhs) const noexcept { return mCurrent >= rhs.mCurrent; }
bool operator>(const reverse_iterator &rhs) const noexcept { return mCurrent < rhs.mCurrent; }
bool operator>=(const reverse_iterator &rhs) const noexcept { return mCurrent <= rhs.mCurrent; }
};
using const_iterator = iterator;
using const_reverse_iterator = reverse_iterator;
using reference = char&;
using const_reference = const char&;
using size_type = std::size_t;
constexpr static size_type npos = std::numeric_limits<size_type>::max();
inline string();
inline string(size_type count, char ch);
inline string(string &&other) noexcept;
inline string(const string &other);
inline string(const std::string &str);
inline string(const std::string_view &sv);
inline string(const char *str);
inline string(const char *str, size_type count);
inline string(const std::string_view &sv, size_type pos, size_type n);
private:
void allocate(size_type new_size)
{
mBuffer.reset((char*)std::malloc(new_size));
}
void reallocate(size_type new_size)
{
mBuffer.reset((char*)std::realloc(mBuffer.release(), new_size));
}
public:
string &operator=(const string &rhs)
{
if (&rhs == this)
return *this;
mLength = rhs.mLength;
reallocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(mBuffer.get(), rhs.data(), mLength);
return *this;
}
string &operator=(string &&rhs) noexcept
{
mLength = std::exchange(rhs.mLength, 0);
mBuffer = std::move(rhs.mBuffer);
return *this;
}
reference at(size_type pos)
{
if (pos >= size())
throw std::out_of_range("invalid string position");
return mBuffer[pos];
}
const_reference at(size_type pos) const
{
if (pos >= size())
throw std::out_of_range("invalid string position");
return mBuffer[pos];
}
reference operator[](size_type pos)
{
return mBuffer[pos];
}
const_reference operator[](size_type pos) const
{
return mBuffer[pos];
}
char &front()
{
return mBuffer[0];
}
const char &front() const
{
return mBuffer[0];
}
char &back()
{
return mBuffer[size() - 1];
}
const char &back() const
{
return mBuffer[size() - 1];
}
bool operator==(const string &rhs) const noexcept
{
const size_type lhs_sz = size();
const size_type rhs_sz = rhs.size();
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(data(), rhs.data(), size()) == 0;
}
bool operator==(const std::string &rhs) const noexcept
{
const size_type lhs_sz = size();
const size_type rhs_sz = rhs.size();
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(data(), rhs.data(), size()) == 0;
}
friend bool operator==(const std::string &lhs, const string &rhs)
{
const size_type lhs_sz = lhs.size();
const size_type rhs_sz = rhs.size();
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(lhs.data(), rhs.data(), lhs.size()) == 0;
}
bool operator==(const std::string_view &rhs) const noexcept
{
const size_type lhs_sz = size();
const size_type rhs_sz = rhs.size();
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(data(), rhs.data(), size()) == 0;
}
friend bool operator==(const std::string_view &lhs, const string &rhs)
{
const size_type lhs_sz = lhs.size();
const size_type rhs_sz = rhs.size();
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(lhs.data(), rhs.data(), lhs.size()) == 0;
}
bool operator==(const char *rhs) const noexcept
{
const size_type lhs_sz = size();
const size_type rhs_sz = std::char_traits<char>::length(rhs);
if (lhs_sz != rhs_sz)
return false;
return std::char_traits<char>::compare(data(), rhs, size()) == 0;
}
#if _MSVC_LANG > 201703L || __cplusplus > 201703L
auto operator<=>(const string &rhs) const noexcept
{
return compare(rhs) <=> 0;
}
#else
bool operator<(const string &rhs) const noexcept
{
return compare(rhs) < 0;
}
bool operator<=(const string &rhs) const noexcept
{
return compare(rhs) <= 0;
}
bool operator>(const string &rhs) const noexcept
{
return compare(rhs) > 0;
}
bool operator>=(const string &rhs) const noexcept
{
return compare(rhs) >= 0;
}
#endif
string &operator+=(const std::string_view &str)
{
return append(str);
}
string &operator+=(const string &str)
{
return append(str);
}
string &operator+=(char ch)
{
return append(1, ch);
}
string &operator+=(const char *str)
{
return operator+=(std::string_view(str));
}
int compare(const string &str) const noexcept
{
const size_type lhs_sz = size();
const size_type rhs_sz = str.size();
const int result = std::char_traits<char>::compare(data(), str.data(), std::min(lhs_sz, rhs_sz));
if (result != 0)
return result;
if (lhs_sz < rhs_sz)
return -1;
if (lhs_sz > rhs_sz)
return 1;
return 0;
}
private:
template <typename T>
bool contains_string_like(const T &str) const
{
return find(str) != npos;
}
public:
bool contains(const string &str) const
{
return contains_string_like(str);
}
bool contains(const std::string &str) const
{
return contains_string_like(str);
}
bool contains(const std::string_view &str) const
{
return contains_string_like(str);
}
bool contains(const char *str) const
{
return contains(std::string_view(str));
}
bool contains(char ch) const
{
return find(ch) != npos;
}
void resize(size_type count)
{
return resize(count, char());
}
void resize(size_type count, char ch)
{
if (count > max_size())
throw std::length_error("string too long");
if (count <= mLength)
{
mLength = count;
mBuffer[mLength] = '\0';
}
else
{
reallocate(count + 1);
mBuffer[count] = '\0';
std::fill_n(&mBuffer[mLength], count - mLength, ch);
mLength = count;
}
}
private:
template <typename T>
size_type find_string_like(const T &str, size_type pos = 0) const
{
if (str.empty())
return pos <= size() ? pos : npos;
if (pos >= size())
return npos;
if (str.size() > size() - pos)
return npos;
const size_type end = size() - str.size();
for (size_type i = pos; i <= end; ++i)
{
if (compare_equal(&mBuffer[i], str.data(), str.size()))
return i;
}
return npos;
}
template <typename T>
size_type rfind_string_like(const T &str, size_type pos = npos) const
{
if (str.empty())
return pos > size() ? size() : pos;
if (empty())
return npos;
if (str.size() > size())
return npos;
pos = std::min(pos, size() - str.size());
const char *cur = &mBuffer[pos];
const char *end = mBuffer.get() - 1;
for (;cur != end; --cur)
{
if (compare_equal(cur, str.data(), str.size()))
return cur - mBuffer.get();
}
return npos;
}
public:
size_type find(const string &str, size_type pos = 0) const
{
return find_string_like(str, pos);
}
size_type find(const std::string &str, size_type pos = 0) const
{
return find_string_like(str, pos);
}
size_type find(const char *str, size_type pos, size_type count) const
{
return find(std::string_view(str, count), pos);
}
size_type find(const char *str, size_type pos = 0) const
{
return find(std::string_view(str), pos);
}
size_type find(char ch, size_type pos = 0) const
{
if (pos >= size())
return npos;
for (size_type i = pos; i < size(); ++i)
{
if (mBuffer[i] == ch)
return i;
}
return npos;
}
size_type find(const std::string_view &sv, size_type pos = 0) const
{
return find_string_like(sv, pos);
}
size_type rfind(const string &str, size_type pos = npos) const
{
return rfind_string_like(str, pos);
}
size_type rfind(const std::string &str, size_type pos = npos) const
{
return rfind_string_like(str, pos);
}
size_type rfind(const char *str, size_type pos, size_type count) const
{
return rfind(std::string_view(str, count), pos);
}
size_type rfind(const char *str, size_type pos = npos) const
{
return rfind(std::string_view(str), pos);
}
size_type rfind(char ch, size_type pos = npos) const
{
if (empty())
return npos;
pos = std::min(pos, size() - 1);
const char *cur = &mBuffer[pos];
const char *end = mBuffer.get() - 1;
for (;cur != end; --cur)
{
if (*cur == ch)
return cur - mBuffer.get();
}
return npos;
}
size_type rfind(const std::string_view &sv, size_type pos = npos) const
{
return rfind_string_like(sv, pos);
}
iterator begin() noexcept { return iterator(mBuffer.get()); }
iterator end() noexcept { return iterator(mBuffer.get() + mLength); }
const_iterator begin() const noexcept { return const_iterator(mBuffer.get()); }
const_iterator end() const noexcept { return const_iterator(mBuffer.get() + mLength); }
const_iterator cbegin() const noexcept { return const_iterator(mBuffer.get()); }
const_iterator cend() const noexcept { return const_iterator(mBuffer.get() + mLength); }
reverse_iterator rbegin() noexcept { return reverse_iterator(mBuffer.get() + mLength - 1); }
reverse_iterator rend() noexcept { return reverse_iterator(mBuffer.get() - 1); }
const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(mBuffer.get() + mLength - 1); }
const_reverse_iterator rend() const noexcept { return const_reverse_iterator(mBuffer.get() - 1); }
const_reverse_iterator crbegin() const noexcept { return const_reverse_iterator(mBuffer.get() + mLength - 1); }
const_reverse_iterator crend() const noexcept { return const_reverse_iterator(mBuffer.get() - 1); }
operator std::string() const { return std_string(); }
operator std::string_view() const noexcept { return view(); }
operator std::filesystem::path() const { return { view() }; }
char *data() { return &mBuffer[0]; }
const char *data() const { return &mBuffer[0]; }
const char *c_str() const { return &mBuffer[0]; }
std::string_view view() const noexcept { return { data(), size() }; }
std::string std_string() const { return { data(), size() }; }
bool empty() const noexcept { return mLength == 0; }
size_type size() const noexcept { return mLength; }
size_type length() const noexcept { return mLength; }
size_type max_size() const noexcept { return std::numeric_limits<size_type>::max() - 1; } // -1 for null terminator or npos
void clear()
{
mLength = 0;
reallocate(1);
mBuffer[mLength] = '\0';
}
string &erase(size_type index, size_type count = npos)
{
// Note: According to cppreference, std::string throws only if > size()
// Erasing at an index of size() should make the count 0 and erase nothing
// But this is still stupid IMHO
if (index > size())
throw std::out_of_range("invalid string position");
count = std::min(count, size() - index);
const size_type end = index + count;
for (size_type i = end; i < size(); ++i)
mBuffer[i - count] = mBuffer[i];
mLength -= count;
mBuffer[mLength] = '\0';
return *this;
}
iterator erase(const_iterator position)
{
if (position == cend())
return end();
iterator current = position;
iterator next = position + 1;
for (;next != end(); ++next, ++current)
*current = *next;
mLength -= 1;
mBuffer[mLength] = '\0';
return empty() ? end() : position;
}
iterator erase(const_iterator first, const_iterator last)
{
const auto range = std::distance(first, last);
iterator current = first;
iterator next = last;
for (;next != end(); ++next, ++current)
*current = *next;
mLength -= range;
mBuffer[mLength] = '\0';
return empty() ? end() : first;
}
void pop_back()
{
if (!empty())
{
--mLength;
mBuffer[mLength] = '\0';
}
}
void push_back(char ch)
{
resize(size() + 1, ch);
}
string &append(size_type count, char ch)
{
resize(size() + count, ch);
return *this;
}
string &append(const std::string_view &str)
{
if (!str.empty())
{
const size_type old_size = size();
resize(old_size + str.size());
std::memcpy(&mBuffer[old_size], str.data(), str.size());
}
return *this;
}
string &append(const string &str)
{
if (!str.empty())
{
const size_type old_size = size();
resize(old_size + str.size());
std::memcpy(&mBuffer[old_size], str.data(), str.size());
}
return *this;
}
private:
template <typename T>
bool starts_with_string_like(const T &str) const noexcept
{
return str.size() > size() ? false :
std::char_traits<char>::compare(data(), str.data(), str.size()) == 0;
}
public:
bool starts_with(const string &str) const noexcept
{
return starts_with_string_like(str);
}
bool starts_with(const std::string &str) const noexcept
{
return starts_with_string_like(str);
}
bool starts_with(const std::string_view &sv) const noexcept
{
return starts_with_string_like(sv);
}
bool starts_with(char c) const noexcept
{
return empty() ? false : mBuffer[0] == c;
}
bool starts_with(const char *str) const noexcept
{
return starts_with(std::string_view(str));
}
private:
template <typename T>
bool ends_with_string_like(const T &str) const noexcept
{
return str.size() > size() ? false :
std::char_traits<char>::compare(&mBuffer[size()] - str.size(), str.data(), str.size()) == 0;
}
public:
bool ends_with(const string &str) const noexcept
{
return ends_with_string_like(str);
}
bool ends_with(const std::string &str) const noexcept
{
return ends_with_string_like(str);
}
bool ends_with(const std::string_view &sv) const noexcept
{
return ends_with_string_like(sv);
}
bool ends_with(char c) const noexcept
{
return empty() ? false : mBuffer[size() - 1] == c;
}
bool ends_with(const char *str) const
{
return ends_with(std::string_view(str));
}
string &lowered()
{
std::transform(cbegin(), cend(), begin(), ::tolower);
return *this;
}
string lower() const
{
string low = *this;
std::transform(low.cbegin(), low.cend(), low.begin(), ::tolower);
return low;
}
string &uppered()
{
std::transform(cbegin(), cend(), begin(), ::toupper);
return *this;
}
string upper() const
{
string up = *this;
std::transform(up.cbegin(), up.cend(), up.begin(), ::toupper);
return up;
}
string &reversed()
{
if (size() > 1)
{
const size_type even = size() % 2;
for (size_type i = 0; i < size(); ++i)
{
const size_type back_index = size() - i - 1;
std::swap(mBuffer[i], mBuffer[back_index]);
if (i + 1 == back_index - even)
break;
}
}
return *this;
}
string reverse() const
{
if (empty())
return {};
string str(size(), char());
for (size_type i = 0; i < size(); ++i)
str[i] = mBuffer[size() - i - 1];
return str;
}
std::string_view split(char ch, size_type offset = 0, split_side side = split_side::left) const
{
// Note: This also serves as an empty() check
if (offset >= size())
return {};
for (size_type i = offset; i < size(); ++i)
{
if (mBuffer[i] == ch)
{
switch (side)
{
case split_side::left:
return std::string_view(&mBuffer[offset], i - offset);
case split_side::right:
if (++i < size())
return std::string_view(&mBuffer[i], size() - i);
else
return {};
}
}
}
switch (side)
{
case split_side::left:
return std::string_view(&mBuffer[offset], size() - offset);
case split_side::right:
return {}; // Hit the end, nothing to return on the right
}
return {};
}
private:
template<typename T>
void split_into_vector(char ch, std::vector<T> &out, size_type offset = 0) const
{
// Note: This also serves as an empty() check
if (offset >= size())
return;
size_type last_split = offset;
for (size_type i = offset; i < size(); ++i)
{
if (mBuffer[i] == ch)
{
out.emplace_back(T(&mBuffer[last_split], i - last_split));
last_split = i + 1;
}
}
if (last_split < size())
out.emplace_back(T(&mBuffer[last_split], size() - last_split));
}
public:
void split(char ch, std::vector<string> &out, size_type offset = 0) const
{
return split_into_vector(ch, out, offset);
}
void split(char ch, std::vector<std::string> &out, size_type offset = 0) const
{
return split_into_vector(ch, out, offset);
}
void split(char ch, std::vector<std::string_view> &out, size_type offset = 0) const
{
return split_into_vector(ch, out, offset);
}
std::string_view rsplit(char ch, size_type roffset = 0, split_side side = split_side::right) const
{
// Note: This also serves as an empty() check
if (roffset >= size())
return {};
for (size_type i = size() - roffset; i > 0; --i)
{
const size_type real_index = i - 1;
if (mBuffer[real_index] == ch)
{
switch (side)
{
case split_side::left:
if (--i > 0)
return std::string_view(&mBuffer[0], real_index);
else
return {};
case split_side::right:
if (i == size())
return {};
return std::string_view(&mBuffer[i], size() - i - roffset);
}
}
}
switch (side)
{
case split_side::left:
return {}; // Hit the end, nothing to return on the left
case split_side::right:
return std::string_view(&mBuffer[0], size() - roffset);
}
return {};
}
template <typename T>
T get_as() const
{
if constexpr (std::is_same_v<T, bool>)
{
return (bool)get_as<int>();
}
else
{
static_assert(std::is_arithmetic_v<T>, "T is not a numeric type");
T value = {};
// Note: Using data() + mLength here because using &mBuffer[mLength] feels wrong even though it's fine.
if (data())
std::from_chars(data(), data() + mLength, value);
return value;
}
}
friend std::ostream &operator<<(std::ostream &os, const string &str)
{
return os << str.view();
}
friend spl::string operator+(const std::string_view &lhs, const std::string_view &rhs)
{
string str(lhs.size() + rhs.size(), char());
std::memcpy(str.data(), lhs.data(), lhs.size());
std::memcpy(str.data() + lhs.size(), rhs.data(), rhs.size());
return str;
}
friend spl::string operator+(const std::string_view &lhs, char rhs)
{
string str(lhs.size() + 1, char());
std::memcpy(str.data(), lhs.data(), lhs.size());
std::memcpy(str.data() + lhs.size(), &rhs, sizeof(rhs));
return str;
}
private:
size_type mLength = 0;
std::unique_ptr<char[], buffer_deleter> mBuffer;
};
inline string::string()
{
allocate(1);
mBuffer[mLength] = '\0';
}
inline string::string(size_type count, char ch)
{
mLength = count;
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::fill_n(&mBuffer[0], mLength, ch);
}
inline string::string(string &&other) noexcept :
mLength(std::exchange(other.mLength, 0)),
mBuffer(std::move(other.mBuffer))
{
}
inline string::string(const string &other)
{
mLength = other.size();
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], other.data(), mLength);
}
inline string::string(const std::string &str)
{
mLength = str.size();
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], str.data(), mLength);
}
inline string::string(const std::string_view &sv)
{
mLength = sv.size();
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], sv.data(), mLength);
}
inline string::string(const char *str)
{
mLength = std::char_traits<char>::length(str);
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], str, mLength);
}
inline string::string(const char *str, size_type count)
{
mLength = count;
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], str, mLength);
}
// TODO: Safety?
inline string::string(const std::string_view &sv, size_type pos, size_type n)
{
mLength = n;
allocate(mLength + 1);
mBuffer[mLength] = '\0';
std::memcpy(&mBuffer[0], &sv[pos], n);
}
template<typename T>
string to_string(T value)
{
constexpr std::size_t maxDigits = 35;
std::array<char, maxDigits> str;
auto [p, ec] = std::to_chars(str.data(), str.data() + str.size(), value);
return string(std::string_view(str.data(), p - str.data()));
}
// Extra logic for standard strings
inline bool contains(const std::string_view &str, const std::string_view &substring)
{
if (substring.size() > str.size())
return false;
// Note: It seems like empty strings are still considered substrings of any string
if (substring.empty())
return true;
const std::size_t difference = str.size() - substring.size();
for (std::size_t i = 0; i <= difference; ++i)
{
if (compare_equal(&str[i], substring.data(), substring.size()))
return true;
}
return false;
}
inline std::string &lowered(std::string &str)
{
std::transform(str.cbegin(), str.cend(), str.begin(), ::tolower);
return str;
}
inline std::string lower(const std::string_view &view)
{
std::string low(view);
std::transform(low.cbegin(), low.cend(), low.begin(), ::tolower);
return low;
}
inline std::string &uppered(std::string &str)
{
std::transform(str.cbegin(), str.cend(), str.begin(), ::toupper);
return str;
}
inline std::string upper(const std::string_view &view)
{
std::string up(view);
std::transform(up.cbegin(), up.cend(), up.begin(), ::toupper);
return up;
}
inline std::string &reversed(std::string &str)
{
if (str.size() > 1)
{
const std::size_t even = str.size() % 2;
for (std::size_t i = 0; i < str.size(); ++i)
{
const std::size_t back_index = str.size() - i - 1;
std::swap(str[i], str[back_index]);
if (i + 1 == back_index - even)
break;
}
}
return str;
}
inline std::string reverse(const std::string_view &view)
{
if (view.empty())
return {};
std::string str(view.size(), char());
for (std::size_t i = 0; i < view.size(); ++i)
str[i] = view[view.size() - i - 1];
return str;
}
inline void split(const std::string_view &view, char ch, std::vector<std::string_view> &out, std::size_t offset = 0)
{
// Note: This also serves as an empty() check
if (offset >= view.size())
return;
std::size_t last_split = offset;
for (std::size_t i = offset; i < view.size(); ++i)
{
if (view[i] == ch)
{
out.emplace_back(std::string_view(&view[last_split], i - last_split));
last_split = i + 1;
}
}
if (last_split < view.size())
out.emplace_back(std::string_view(&view[last_split], view.size() - last_split));
}
}
// Hashing so spl::string can be used in containers like std::unordered_map
namespace std
{
template<> struct hash<spl::string>
{
std::size_t operator()(const spl::string &str) const noexcept
{
// spl::string should be implicitly convertible to std::string_view via operator
return std::hash<std::string_view>{}(str);
}
};
} | 21.281811 | 124 | 0.65274 |
4f1688b27d2aeb3a787593dcae2a7abd0a6134e6 | 6,300 | h | C | include/gtu-path.h | Bob131/giitestutils | 1f6affe4b5b95d2a75c087bd0984d602f7d2694a | [
"MIT"
] | 1 | 2018-02-09T13:14:41.000Z | 2018-02-09T13:14:41.000Z | include/gtu-path.h | Bob131/giitestutils | 1f6affe4b5b95d2a75c087bd0984d602f7d2694a | [
"MIT"
] | null | null | null | include/gtu-path.h | Bob131/giitestutils | 1f6affe4b5b95d2a75c087bd0984d602f7d2694a | [
"MIT"
] | null | null | null | #ifndef __GII_TEST_UTILS_PATH_H__
#define __GII_TEST_UTILS_PATH_H__
/**
* SECTION:gtu-path
* @short_description: test object identifiers
* @title: Test Paths
* @include: gtu.h
*
* Test objects in GTU, like in GLib, are identified by a path (similar in
* appearance to a UNIX file path). To make manipulation of these paths easier,
* a convenience type is provided: #GtuPath.
*
* A #GtuPath internally holds a list of <emphasis>elements</emphasis>, strings
* that identify individual #GtuTestObject instances. These elements are
* delimited by a slash/stroke (`/`) to describe hierarchies of #GtuTestSuite
* and #GtuTestCase.
*
* Paths are guaranteed to be:
* - absolute,
* - without a terminating stroke, and
* - free of whitespace.
*
* Projects utilising GTU will typically don't need to use any path
* functionality, or otherwise will only be interested in gtu_path_to_string().
* Other functions are exposed just in case, but for the most part these are
* internal to GTU.
*
* ## Validity {#Validity}
*
* Path elements are invalid if:
* - they contain a slash/stroke (`/`), or
* - they contain whitespace, or
* - they have zero length (`element == ""`).
*
* Paths are invalid if:
* - they are missing a leading slash/stroke (`/`), or
* - they contain a trailing stroke, or
* - they contain whitespace, or
* - they don't declare any elements (e.g. `path == ""`, `path == "/"`), or
* - they contain invalid elements.
* - This includes zero length elements (i.e. two consecutive strokes `//`
* within a path denote a zero-length element between those strokes,
* making such a path invalid).
*/
#ifndef __GII_TEST_UTILS_H__
#error "Only <gtu.h> can be included directly."
#endif
G_BEGIN_DECLS
/**
* GtuPath:
*
* Type representing a test object identifier.
*/
typedef struct _GtuPath GtuPath;
/**
* gtu_path_new:
*
* Creates an empty #GtuPath. The new instance is considered invalid until
* elements are added to it. The result should be freed with gtu_path_free()
* when it's no longer required.
*
* Returns: a new #GtuPath instance.
*/
GtuPath* gtu_path_new (void);
/**
* gtu_path_new_parse:
* @path: a test path string.
* @endptr: (allow-none) (out): the location in @path at which processing was
* stopped.
*
* Parses @path into a new #GtuPath instance. Returns %NULL if @path is not
* valid (see #Validity).
*
* @endptr is a return parameter indicating the location in @path where parsing
* finished: If @path was parsed successfully this will be equal to `path +
* strlen (path)`, otherwise it points to the first invalid character in @path.
*
* Returns: (allow-none): a new #GtuPath instance filled with elements of
* @path, or %NULL if @path is invalid.
*/
GtuPath* gtu_path_new_parse (const char* path, char** endptr);
/**
* gtu_path_copy:
* @path: #GtuPath instance to copy.
*
* Creates a new #GtuPath instance containing the elements of @path. The result
* should be freed with gtu_path_free() when it's no longer required.
*
* Returns: a new copy of @path.
*/
GtuPath* gtu_path_copy (const GtuPath* path);
/**
* gtu_path_free:
* @path: #GtuPath instance to free.
*
* Destroys an instance of #GtuPath, freeing any resources it holds.
*/
void gtu_path_free (GtuPath* path);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GtuPath, gtu_path_free)
/**
* gtu_path_is_valid:
* @path: #GtuPath instance to check.
*
* This function checks whether @path represents a valid test object
* identifier, as per #Validity.
*
* Returns: %TRUE if @self is valid, otherwise %FALSE.
*/
bool gtu_path_is_valid (const GtuPath* path);
/**
* gtu_path_to_string:
* @path: #GtuPath instance to serialise into a string. Must be valid.
*
* Collects elements of @path and concatenates them into a string, guaranteed
* to be a valid path string as per #Validity.
*
* The result is owned by the @path instance and should not be altered or freed.
* The returned pointer is only guaranteed to be valid whilst @path is not
* modified; mutating the path may cause it to become invalid. If you need to
* hold onto the string, it's recommended that you create a copy.
*
* The result of calling this function is undefined if @path is invalid (i.e.
* if gtu_path_is_valid() would return %FALSE).
*
* Returns: (transfer none): string representation of @path.
*/
const char* gtu_path_to_string (const GtuPath* path);
/**
* gtu_path_prepend_element:
* @path: #GtuPath instance to which @to_prepend will be added.
* @to_prepend: element to prepend to @path. Must be a valid element.
*
* Prepends @to_prepend to @path. The @to_prepend string is copied, so the
* caller may free it once the call has returned.
*/
void gtu_path_prepend_element (GtuPath* path, const char* to_prepend);
/**
* gtu_path_append_element:
* @path: #GtuPath instance to which @to_append will be added.
* @to_append: element to append to @path. Must be a valid element.
*
* Appends @to_append to @path. The @to_append string is copied, so the caller
* may free it once the call has returned.
*/
void gtu_path_append_element (GtuPath* path, const char* to_append);
/**
* gtu_path_prepend_path:
* @path: #GtuPath instance to which the elements of @to_prepend will be
* added.
* @to_prepend: #GtuPath instance whose elements will be prepended to @path.
*
* Copies and prepends all elements from @to_prepend to @path.
*/
void gtu_path_prepend_path (GtuPath* path, const GtuPath* to_prepend);
/**
* gtu_path_append_path:
* @path: #GtuPath instance to which the elements of @to_append will be
* added.
* @to_append: #GtuPath instance whose elements will be appended to @path.
*
* Copies and appends all elements from @to_append to @path.
*/
void gtu_path_append_path (GtuPath* path, const GtuPath* to_append);
/**
* gtu_path_has_prefix:
* @path: #GtuPath instance to check.
* @prefix: prefix to test against @path.
*
* Checks whether @path is a subpath of @prefix.
*
* Returns: %TRUE if all elements in @prefix match the first elements in @path,
* or if @path and @prefix are equal; otherwise, return %FALSE.
*/
bool gtu_path_has_prefix (const GtuPath* path, const GtuPath* prefix);
G_END_DECLS
#endif
| 32.307692 | 80 | 0.703968 |
4f176544395166cdba59a7c1338de73452d84d19 | 3,818 | c | C | srcs/settings/options/audio_options.c | Killian-G/doom-nukem | 4df124a0006a61ebd3a525b983d67bfe7f0a78f2 | [
"MIT"
] | null | null | null | srcs/settings/options/audio_options.c | Killian-G/doom-nukem | 4df124a0006a61ebd3a525b983d67bfe7f0a78f2 | [
"MIT"
] | null | null | null | srcs/settings/options/audio_options.c | Killian-G/doom-nukem | 4df124a0006a61ebd3a525b983d67bfe7f0a78f2 | [
"MIT"
] | null | null | null | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* audio_options.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thboura <thboura@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/06 18:35:32 by thboura #+# #+# */
/* Updated: 2020/06/24 23:47:27 by thboura ### ########.fr */
/* */
/* ************************************************************************** */
#include "doom_nukem.h"
bool destroy_audio_options(t_audio_options *audio)
{
int ret;
ret = 0;
if (!audio)
return (true);
ret += !destroy_objects_options(&audio->objects);
ret += !destroy_gui_options(&audio->gui);
ret += !destroy_ambient_options(&audio->ambient);
ret += !destroy_fslider(&audio->global_amplitude_fslider);
ret += !destroy_label(&audio->global_amplitude_label);
ret += !destroy_container(&audio->container);
return (ret == 0);
}
static bool create_audio_options_p2(t_env *env, t_audio_options *audio,
SDL_Rect box, size_t num_of_buttons)
{
if (!(audio->global_amplitude_label = create_label(vec2i(25,
0 * (box.h / num_of_buttons) + (box.h / num_of_buttons / 2
- (int)(19 / 2)) + (box.h % num_of_buttons)), 0xFFFFFFFF,
env->fonts.deja_vu_sans_momo_16, 0x666666FF))
|| !label_change_name(audio->global_amplitude_label,
"Global volume")
|| !container_add(env->gui.settings_menu.audio.container,
audio->global_amplitude_label)
|| !(audio->global_amplitude_fslider = create_fslider(
(SDL_Rect){box.w / 2, 0 * (box.h / num_of_buttons) + box.h
/ num_of_buttons / 4 + (box.h % num_of_buttons),
box.w / 2 - 25, box.h / num_of_buttons / 2}, 0.f, 1.f))
|| !add_custom_action(audio->global_amplitude_fslider->on_value_change,
&(t_custom_event){&slider_update_global_amplitude,
&env->sound_manager}))
return (destroy_audio_options(audio) && 0);
fslider_set_percent_value(audio->global_amplitude_fslider,
env->sound_manager.global_amplitude);
if (!container_add(env->gui.settings_menu.audio.container,
audio->global_amplitude_fslider))
return (destroy_audio_options(audio) && 0);
return (true);
}
bool create_audio_options(t_env *env, t_audio_options *audio)
{
SDL_Rect box;
size_t num_of_buttons;
num_of_buttons = NUM_OF_SOURCES + 4;
box.w = env->main_window->size.x;
box.h = env->main_window->size.y - 50;
box.x = 0;
box.y = 50;
if (!(audio->container = create_container(box, true, 0X777777FF)))
return (false);
if (!create_audio_options_p2(env, audio, box, num_of_buttons)
|| !create_ambient_options(env, &audio->ambient, box, num_of_buttons)
|| !create_gui_options(env, &audio->gui, box, num_of_buttons)
|| !create_objects_options(env, &audio->objects, box, num_of_buttons)
|| !container_add(env->gui.settings_menu.container, audio->container))
return (destroy_audio_options(audio) && 0);
audio->container->component.is_visible = false;
return (true);
}
bool init_audio_options(void *param)
{
t_env *env;
env = param;
if (env->gui.settings_menu.current_option != AUDIO_OPTION)
{
env->gui.settings_menu.audio_button->component.background = 0X777777FF;
env->gui.settings_menu.audio_button->component.need_redraw = true;
disable_current_option(&env->gui.settings_menu);
}
env->gui.settings_menu.current_option = AUDIO_OPTION;
env->gui.settings_menu.audio.container->component.is_visible = true;
return (true);
}
| 40.189474 | 80 | 0.588266 |
4f17abc9a95a7bc351d4bf2068242c1b5991dfc3 | 417 | c | C | d/avatars/lurue/windgem.c | gesslar/shadowgate | 97ce5d33a2275bb75c0cf6556602564b7870bc77 | [
"MIT"
] | 13 | 2019-07-19T05:24:44.000Z | 2021-11-18T04:08:19.000Z | d/avatars/lurue/windgem.c | gesslar/shadowgate | 97ce5d33a2275bb75c0cf6556602564b7870bc77 | [
"MIT"
] | null | null | null | d/avatars/lurue/windgem.c | gesslar/shadowgate | 97ce5d33a2275bb75c0cf6556602564b7870bc77 | [
"MIT"
] | 13 | 2019-09-12T06:22:38.000Z | 2022-01-31T01:15:12.000Z | #include <std.h>
inherit OBJECT;
void create(){
::create();
set_name("%^BLUE%^blue gem%^RESET%^");
set_id(({ "gem", "blue gem" }));
set_short("%^BOLD%^%^BLUE%^a blue gem%^RESET%^");
set_obvious_short("%^BOLD%^%^BLUE%^a blue gem%^RESET%^");
set_long(
@AVATAR
%^BOLD%^%^BLUE%^This blue gem is strangely transparent and glows with a ever churning inner light!%^RESET%^
AVATAR
);
set_weight(3);
set_value(0);
} | 23.166667 | 107 | 0.647482 |
4f199cab49ad05d0213f22e35216816418f3c13d | 10,744 | c | C | osnorm.c | OrdinaryMagician/Stuff | cc65edd617302692a8209426e96a53afa6295b11 | [
"MIT"
] | 2 | 2017-09-05T03:33:16.000Z | 2017-09-05T11:53:40.000Z | osnorm.c | OrdinaryMagician/Stuff | cc65edd617302692a8209426e96a53afa6295b11 | [
"MIT"
] | null | null | null | osnorm.c | OrdinaryMagician/Stuff | cc65edd617302692a8209426e96a53afa6295b11 | [
"MIT"
] | null | null | null | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define dword __UINT32_TYPE__
#define byte __UINT8_TYPE__
typedef struct
{
char magic[4];
dword size, flags, height, width, pitch, depth, mipmaps, reserved1[11],
pf_size, pf_flags;
char pf_fourcc[4];
dword pf_bitcount, pf_rmask, pf_gmask, pf_bmask, pf_amask, caps[4],
reserved2;
} __attribute__((packed)) ddsheader_t;
ddsheader_t head =
{
.magic = "DDS ", .size = 124,
.flags = 0x0000100F, /* caps|height|width|pitch|pixelformat */
.height = 0, .width = 0, .pitch = 0, .depth = 0, /* set later */
.mipmaps = 0, .reserved1 = {0,0,0,0,0,0,0,0,0,0,0}, .pf_size = 32,
.pf_flags = 0x41 /* uncompressed|alpha */, .pf_fourcc = {0}, /* N/A */
.pf_bitcount = 32, .pf_rmask = 0xff, .pf_gmask = 0xff00,
.pf_bmask = 0xff0000, .pf_amask = 0xff000000, /* RGBA mask */
.caps = {0x1000,0,0,0}, /* texture */ .reserved2 = 0
};
typedef struct { byte r,g,b,a; } __attribute__((packed)) pixel_t;
unsigned w = 0, h = 0;
pixel_t *tex = 0, *ttex = 0;
FILE *obj, *dds, *tmap;
typedef struct { float x,y,z; } vect_t;
typedef struct { float u,v; } uv_t;
typedef struct { int v,c,n; } vert_t;
typedef struct { vert_t a,b,c; } tri_t;
typedef struct { int x,y; } vec2_t;
typedef struct { pixel_t c[2]; vec2_t p[2]; } edge_t;
vect_t *verts = 0, *norms = 0, *tangents = 0, *binormals = 0;
uv_t *uvs = 0;
tri_t *tris = 0;
int nvert = 0, nnorm = 0, ncoord = 0, nface = 0;
void cross( vect_t *a, vect_t b, vect_t c )
{
a->x = b.y*c.z-b.z*c.y;
a->y = b.z*c.x-b.x*c.z;
a->z = b.x*c.y-b.y*c.x;
}
void normalize( vect_t *a )
{
float scale = sqrtf(powf(a->x,2.f)+powf(a->y,2.f)+powf(a->z,2.f));
a->x /= scale;
a->y /= scale;
a->z /= scale;
}
void normalize2( uv_t *a )
{
float scale = sqrtf(powf(a->u,2.f)+powf(a->v,2.f));
a->u /= scale;
a->v /= scale;
}
float dot( vect_t a, vect_t b )
{
return a.x*b.x+a.y*b.y+a.z*b.z;
}
void tangent( vect_t *t, vect_t *b, int n )
{
vect_t t1 = {0,0,0}, t2 = {0,0,0};
for ( int j=0; j<nface; j++ )
{
if ( (tris[j].a.n != n) && (tris[j].b.n != n)
&& (tris[j].c.n != n) ) continue;
}
}
void calctangents( void )
{
if ( tangents ) free(tangents);
if ( binormals ) free(binormals);
tangents = malloc(sizeof(vect_t)*nnorm);
binormals = malloc(sizeof(vect_t)*nnorm);
memset(tangents,0,sizeof(vect_t)*nnorm);
memset(binormals,0,sizeof(vect_t)*nnorm);
vect_t *t1, *t2;
t1 = malloc(sizeof(vect_t)*nnorm);
t2 = malloc(sizeof(vect_t)*nnorm);
memset(t1,0,sizeof(vect_t)*nnorm);
memset(t2,0,sizeof(vect_t)*nnorm);
for ( int j=0; j<nface; j++ )
{
vect_t abv, acv;
uv_t abc, acc;
float r;
vect_t ud, vd;
abv.x = verts[tris[j].b.v].x-verts[tris[j].a.v].x;
abv.y = verts[tris[j].b.v].y-verts[tris[j].a.v].y;
abv.z = verts[tris[j].b.v].z-verts[tris[j].a.v].z;
acv.x = verts[tris[j].c.v].x-verts[tris[j].a.v].x;
acv.y = verts[tris[j].c.v].y-verts[tris[j].a.v].y;
acv.z = verts[tris[j].c.v].z-verts[tris[j].a.v].z;
abc.u = uvs[tris[j].b.c].u-uvs[tris[j].a.c].u;
abc.v = uvs[tris[j].b.c].v-uvs[tris[j].a.c].v;
acc.u = uvs[tris[j].c.c].u-uvs[tris[j].a.c].u;
acc.v = uvs[tris[j].c.c].v-uvs[tris[j].a.c].v;
r = 1.f/(abc.u*acc.v-acc.u*abc.v);
ud.x = (acc.v*abv.x-abc.v-acv.x)*r;
ud.y = (acc.v*abv.y-abc.v-acv.y)*r;
ud.z = (acc.v*abv.z-abc.v-acv.z)*r;
vd.x = (abc.u*acv.x-acc.u-abv.x)*r;
vd.y = (abc.u*acv.y-acc.u-abv.y)*r;
vd.z = (abc.u*acv.z-acc.u-abv.z)*r;
t1[tris[j].a.n].x += ud.x;
t1[tris[j].a.n].y += ud.y;
t1[tris[j].a.n].z += ud.z;
t1[tris[j].b.n].x += ud.x;
t1[tris[j].b.n].y += ud.y;
t1[tris[j].b.n].z += ud.z;
t1[tris[j].c.n].x += ud.x;
t1[tris[j].c.n].y += ud.y;
t1[tris[j].c.n].z += ud.z;
t2[tris[j].a.n].x += vd.x;
t2[tris[j].a.n].y += vd.y;
t2[tris[j].a.n].z += vd.z;
t2[tris[j].b.n].x += vd.x;
t2[tris[j].b.n].y += vd.y;
t2[tris[j].b.n].z += vd.z;
t2[tris[j].c.n].x += vd.x;
t2[tris[j].c.n].y += vd.y;
t2[tris[j].c.n].z += vd.z;
}
for ( int i=0; i<nnorm; i++ )
{
float dotnt = dot(norms[i],t1[i]);
tangents[i].x = t1[i].x-norms[i].x*dotnt;
tangents[i].y = t1[i].y-norms[i].y*dotnt;
tangents[i].z = t1[i].z-norms[i].z*dotnt;
normalize(&tangents[i]);
cross(&binormals[i],norms[i],t1[i]);
float hand = (dot(binormals[i],t2[i])<0.f)?-1.f:1.f;
binormals[i].x *= hand;
binormals[i].y *= hand;
binormals[i].z *= hand;
}
free(t1);
free(t2);
}
void calcnormals( void )
{
if ( norms ) free(norms);
norms = malloc(sizeof(vect_t)*nvert);
memset(norms,0,sizeof(vect_t)*nvert);
nnorm = nvert;
for ( int i=0; i<nface; i++ )
{
tris[i].a.n = tris[i].a.v;
tris[i].b.n = tris[i].b.v;
tris[i].c.n = tris[i].c.v;
}
for ( int i=0; i<nvert; i++ )
{
for ( int j=0; j<nface; j++ )
{
if ( (tris[j].a.v != i) && (tris[j].b.v != i)
&& (tris[j].c.v != i) ) continue;
vect_t facet, ab, ac;
ab.x = verts[tris[j].b.v].x-verts[tris[j].a.v].x;
ab.y = verts[tris[j].b.v].y-verts[tris[j].a.v].y;
ab.z = verts[tris[j].b.v].z-verts[tris[j].a.v].z;
ac.x = verts[tris[j].c.v].x-verts[tris[j].a.v].x;
ac.y = verts[tris[j].c.v].y-verts[tris[j].a.v].y;
ac.z = verts[tris[j].c.v].z-verts[tris[j].a.v].z;
cross(&facet,ab,ac);
normalize(&facet);
norms[i].x += facet.x;
norms[i].y += facet.y;
norms[i].z += facet.z;
}
normalize(&norms[i]);
}
}
void loadobj( void )
{
char rbuf[131072];
char *txt = 0;
size_t nread, len = 0, pos = 0;
fseek(obj,0,SEEK_END);
len = ftell(obj);
fseek(obj,0,SEEK_SET);
txt = malloc(len+1);
do
{
nread = fread(rbuf,1,131072,obj);
memcpy(txt+pos,rbuf,nread);
pos += nread;
}
while ( !feof(obj) );
txt[pos] = 0;
char *line = txt;
do
{
if ( !strncmp(line,"v ",2) ) nvert++;
else if ( !strncmp(line,"vt ",3) ) ncoord++;
else if ( !strncmp(line,"vn ",3) ) nnorm++;
else if ( !strncmp(line,"f ",2) ) nface++;
line = strchr(line,'\n');
}
while ( line && *(line++) );
verts = malloc(sizeof(vect_t)*nvert);
norms = malloc(sizeof(vect_t)*nnorm);
uvs = malloc(sizeof(uv_t)*ncoord);
tris = malloc(sizeof(tri_t)*nface);
memset(verts,0,sizeof(vect_t)*nvert);
memset(norms,0,sizeof(vect_t)*nnorm);
memset(uvs,0,sizeof(uv_t)*ncoord);
memset(tris,0,sizeof(tri_t)*nface);
int cv = 0, cc = 0, cn = 0, cf = 0;
line = strtok(txt,"\n");
do
{
if ( !strncmp(line,"v ",2) )
{
sscanf(line,"v %f %f %f",&verts[cv].x,&verts[cv].y,
&verts[cv].z);
cv++;
}
else if ( !strncmp(line,"vt ",3) )
{
sscanf(line,"vt %f %f",&uvs[cc].u,&uvs[cc].v);
uvs[cc].v = 1.0-uvs[cc].v;
cc++;
}
else if ( !strncmp(line,"vn ",3) )
{
sscanf(line,"vn %f %f %f",&norms[cn].x,&norms[cn].y,
&norms[cn].z);
cn++;
}
else if ( !strncmp(line,"f ",2) )
{
if ( cn <= 0 )
{
sscanf(line,"f %d/%d %d/%d %d/%d",
&tris[cf].a.v,&tris[cf].a.c,
&tris[cf].b.v,&tris[cf].b.c,
&tris[cf].c.v,&tris[cf].c.c);
}
else
{
sscanf(line,"f %d/%d/%d %d/%d/%d %d/%d/%d",
&tris[cf].a.v,&tris[cf].a.c,
&tris[cf].a.n,&tris[cf].b.v,
&tris[cf].b.c,&tris[cf].b.n,
&tris[cf].c.v,&tris[cf].c.c,
&tris[cf].c.n);
}
tris[cf].a.v--;
tris[cf].a.c--;
tris[cf].a.n--;
tris[cf].b.v--;
tris[cf].b.c--;
tris[cf].b.n--;
tris[cf].c.v--;
tris[cf].c.c--;
tris[cf].c.n--;
cf++;
}
}
while ( (line = strtok(0,"\n")) );
free(txt);
}
void mkedge( edge_t *e, pixel_t c1, vec2_t p1, pixel_t c2, vec2_t p2 )
{
if ( p1.y < p2.y )
{
e->c[0] = c1;
e->p[0] = p1;
e->c[1] = c2;
e->p[1] = p2;
}
else
{
e->c[0] = c2;
e->p[0] = p2;
e->c[1] = c1;
e->p[1] = p1;
}
}
void lerpcolor( pixel_t *o, pixel_t a, pixel_t b, float f )
{
f = (f>0.f)?(f>1.f)?1.f:f:0.f;
o->r = a.r*(1.f-f)+b.r*f;
o->g = a.g*(1.f-f)+b.g*f;
o->b = a.b*(1.f-f)+b.b*f;
o->a = a.a*(1.f-f)+b.a*f;
}
void drawspans( edge_t a, edge_t b )
{
float e1 = a.p[1].y-a.p[0].y;
if ( e1 == 0.f ) return;
float e2 = b.p[1].y-b.p[0].y;
if ( e2 == 0.f ) return;
float is1 = (float)(a.p[1].x-a.p[0].x);
float is2 = (float)(b.p[1].x-b.p[0].x);
float f1 = (float)(b.p[0].y-a.p[0].y)/e1;
float fs1 = 1.f/e1;
float f2 = 0.f;
float fs2 = 1.f/e2;
for ( int y=b.p[0].y; y<b.p[1].y; y++ )
{
pixel_t c1, c2, c3;
lerpcolor(&c1,a.c[0],a.c[1],f1);
lerpcolor(&c2,b.c[0],b.c[1],f2);
int x1 = a.p[0].x+(int)(is1*f1);
int x2 = b.p[0].x+(int)(is2*f2);
if ( x1>x2 )
{
int tmp = x1;
x1 = x2;
x2 = tmp;
pixel_t tmpc = c1;
c1 = c2;
c2 = tmpc;
}
int xd = x2-x1;
if ( xd != 0 )
{
float fx = 0.f, fsx = 1.f/(float)xd;
for ( int x=x1; x<x2; x++ )
{
lerpcolor(&c3,c1,c2,fx);
if ( (x >= 0) && (x < w) && (y >= 0)
&& (y < h) )
if ( !tex[x+y*w].a ) tex[x+y*w] = c3;
fx += fsx;
}
}
f1 += fs1;
f2 += fs2;
}
}
void drawtriangle( int t1, int t2, int t3, int n1, int n2, int n3 )
{
pixel_t col[3] =
{
{(norms[n1].x*0.5f+0.5f)*255,(norms[n1].z*0.5f+0.5f)*255,
(norms[n1].y*0.5+0.5)*255,255},
{(norms[n2].x*0.5f+0.5f)*255,(norms[n2].z*0.5f+0.5f)*255,
(norms[n2].y*0.5+0.5)*255,255},
{(norms[n3].x*0.5f+0.5f)*255,(norms[n3].z*0.5f+0.5f)*255,
(norms[n3].y*0.5f+0.5f)*255,255},
};
vec2_t pts[3] =
{
{uvs[t1].u*w,uvs[t1].v*h},
{uvs[t2].u*w,uvs[t2].v*h},
{uvs[t3].u*w,uvs[t3].v*h}
};
edge_t edges[3];
mkedge(&edges[0],col[0],pts[0],col[1],pts[1]);
mkedge(&edges[1],col[1],pts[1],col[2],pts[2]);
mkedge(&edges[2],col[2],pts[2],col[0],pts[0]);
float ml = 0;
int longest = 0, short1 = 0, short2 = 0;
for ( int i=0; i<3; i++ )
{
float l = edges[i].p[1].y-edges[i].p[0].y;
if ( l > ml )
{
ml = l;
longest = i;
}
}
short1 = (longest+1)%3;
short2 = (longest+2)%3;
drawspans(edges[longest],edges[short1]);
drawspans(edges[longest],edges[short2]);
}
void plotnormals( void )
{
int x1, y1, x2, y2, x3, y3;
for ( int i=0; i<nface; i++ )
drawtriangle(tris[i].a.c,tris[i].b.c,tris[i].c.c,
tris[i].a.n,tris[i].b.n,tris[i].c.n);
}
int main( int argc, char **argv )
{
if ( argc < 4 ) return 1;
sscanf(argv[3],"%ux%u",&w,&h);
head.width = w;
head.height = h;
head.pitch = w*4;
/* load model */
if ( !(obj = fopen(argv[1],"r")) ) return 2;
loadobj();
fclose(obj);
/* plot pixels */
tex = malloc(sizeof(pixel_t)*w*h);
memset(tex,0,sizeof(pixel_t)*w*h);
printf("calculate normals\n");
calcnormals();
printf("calculate tangents and binormals\n");
calctangents();
printf("plot normals\n");
plotnormals();
/* clean up */
if ( !verts ) free(verts);
if ( !norms ) free(norms);
if ( !tangents ) free(tangents);
if ( !binormals ) free(binormals);
if ( !uvs ) free(uvs);
if ( !tris ) free(tris);
/* save texture */
if ( !(dds = fopen(argv[2],"w")) ) { fclose(obj); return 4; }
fwrite(&head,sizeof(ddsheader_t),1,dds);
fwrite(tex,sizeof(pixel_t),w*h,dds);
free(tex);
fclose(dds);
return 0;
}
| 24.52968 | 72 | 0.546538 |
4f1a328373cd4a183ce8dfe4c6bb1e5be3fe60b5 | 493 | h | C | samples/lottie/still_helper.h | naeioi/octoon | e32152fe4730fa609def41114613dbe067d31276 | [
"MIT"
] | null | null | null | samples/lottie/still_helper.h | naeioi/octoon | e32152fe4730fa609def41114613dbe067d31276 | [
"MIT"
] | null | null | null | samples/lottie/still_helper.h | naeioi/octoon | e32152fe4730fa609def41114613dbe067d31276 | [
"MIT"
] | null | null | null | #ifndef STILL_HELPER_H_
#define STILL_HELPER_H_
#include "keyframe_helper.h"
class StillHelper
{
public:
using json = octoon::runtime::json;
using float1 = octoon::math::float1;
using float2 = octoon::math::float2;
using float3 = octoon::math::float3;
using float4 = octoon::math::float4;
std::string refid;
StillHelper()
{
}
StillHelper(const json& j)
{
this->prepare(j);
}
void prepare(const json& layer)
{
refid = layer["refId"].get<json::string_t>();
}
};
#endif | 14.939394 | 47 | 0.687627 |
4f1b6cb2c04fcfd9b8c3bb8ea2249bfb1ebfdb02 | 997 | h | C | bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.h | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 3 | 2020-05-30T07:04:33.000Z | 2021-08-07T07:41:27.000Z | bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.h | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 149 | 2018-12-18T12:49:56.000Z | 2022-01-06T10:51:32.000Z | bitbots_motion/bitbots_dynup/include/bitbots_dynup/visualizer.h | MosHumanoid/bitbots_thmos_meta | f45ccc362dc689b69027be5b0d000d2a08580de4 | [
"MIT"
] | 4 | 2019-07-28T11:25:02.000Z | 2021-12-06T19:04:18.000Z | #ifndef BITBOTS_DYNUP_INCLUDE_BITBOTS_DYNUP_VISUALIZER_H_
#define BITBOTS_DYNUP_INCLUDE_BITBOTS_DYNUP_VISUALIZER_H_
#include <string>
#include <ros/ros.h>
#include <visualization_msgs/MarkerArray.h>
#include <bitbots_splines/smooth_spline.h>
#include <bitbots_splines/spline_container.h>
#include <geometry_msgs/PoseStamped.h>
#include <tf2/LinearMath/Vector3.h>
#include <bitbots_splines/abstract_visualizer.h>
namespace bitbots_dynup {
struct VisualizationParams {
int spline_smoothness;
};
class Visualizer : bitbots_splines::AbstractVisualizer {
public:
Visualizer(const std::string &base_topic);
void setParams(VisualizationParams params);
void displaySplines(bitbots_splines::PoseSpline splines, const std::string &frame);
private:
ros::NodeHandle node_handle_;
ros::Publisher spline_publisher_;
std::string base_topic_;
const std::string marker_ns_ = "bitbots_dynup";
VisualizationParams params_;
};
}
#endif //BITBOTS_DYNUP_INCLUDE_BITBOTS_DYNUP_VISUALIZER_H_
| 26.236842 | 85 | 0.81344 |
4f1dcee40ec45c203d3fe200e0941282be06ea26 | 17,870 | h | C | UIFontLibrary/UIFontLibrary/UIFont+Library.h | luzizheng/UIFontLibrary | 24dff59b55f18abc3f527ace3e7d954915224351 | [
"MIT"
] | null | null | null | UIFontLibrary/UIFontLibrary/UIFont+Library.h | luzizheng/UIFontLibrary | 24dff59b55f18abc3f527ace3e7d954915224351 | [
"MIT"
] | null | null | null | UIFontLibrary/UIFontLibrary/UIFont+Library.h | luzizheng/UIFontLibrary | 24dff59b55f18abc3f527ace3e7d954915224351 | [
"MIT"
] | null | null | null | //
// UIFont+Library.h
// UIFontLibrary
//
// Created by zizheng lu on 2020/9/28.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIFont (Library)
#pragma mark - Academy Engraved LET
+(UIFont *)fontWithAcademyengravedletplain:(CGFloat)fontSize;
#pragma mark - Al Nile
+(UIFont *)fontWithAlnile:(CGFloat)fontSize;
+(UIFont *)fontWithAlnileBold:(CGFloat)fontSize;
#pragma mark - American Typewriter
+(UIFont *)fontWithAmericantypewriter:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterLight:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterSemibold:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterBold:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterCondensed:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterCondensedlight:(CGFloat)fontSize;
+(UIFont *)fontWithAmericantypewriterCondensedbold:(CGFloat)fontSize;
#pragma mark - Apple Color Emoji
+(UIFont *)fontWithApplecoloremoji:(CGFloat)fontSize;
#pragma mark - Apple SD Gothic Neo
+(UIFont *)fontWithApplesdgothicneoRegular:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoThin:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoLight:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoMedium:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoSemibold:(CGFloat)fontSize;
+(UIFont *)fontWithApplesdgothicneoBold:(CGFloat)fontSize;
#pragma mark - Apple Symbols
+(UIFont *)fontWithApplesymbols:(CGFloat)fontSize;
#pragma mark - Arial
+(UIFont *)fontWithArialmt:(CGFloat)fontSize;
+(UIFont *)fontWithArialItalicmt:(CGFloat)fontSize;
+(UIFont *)fontWithArialBoldmt:(CGFloat)fontSize;
+(UIFont *)fontWithArialBolditalicmt:(CGFloat)fontSize;
#pragma mark - Arial Hebrew
+(UIFont *)fontWithArialhebrew:(CGFloat)fontSize;
+(UIFont *)fontWithArialhebrewLight:(CGFloat)fontSize;
+(UIFont *)fontWithArialhebrewBold:(CGFloat)fontSize;
#pragma mark - Arial Rounded MT Bold
+(UIFont *)fontWithArialroundedmtbold:(CGFloat)fontSize;
#pragma mark - Avenir
+(UIFont *)fontWithAvenirBook:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirRoman:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirBookoblique:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirOblique:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirLight:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirLightoblique:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirMedium:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirMediumoblique:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirHeavy:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirHeavyoblique:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirBlack:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirBlackoblique:(CGFloat)fontSize;
#pragma mark - Avenir Next
+(UIFont *)fontWithAvenirnextRegular:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextItalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextUltralightitalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextMedium:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextMediumitalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextDemibold:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextDemibolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextBold:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextHeavy:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextHeavyitalic:(CGFloat)fontSize;
#pragma mark - Avenir Next Condensed
+(UIFont *)fontWithAvenirnextcondensedRegular:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedItalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedUltralightitalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedMedium:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedMediumitalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedDemibold:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedDemibolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedBold:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedHeavy:(CGFloat)fontSize;
+(UIFont *)fontWithAvenirnextcondensedHeavyitalic:(CGFloat)fontSize;
#pragma mark - Baskerville
+(UIFont *)fontWithBaskerville:(CGFloat)fontSize;
+(UIFont *)fontWithBaskervilleItalic:(CGFloat)fontSize;
+(UIFont *)fontWithBaskervilleSemibold:(CGFloat)fontSize;
+(UIFont *)fontWithBaskervilleSemibolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithBaskervilleBold:(CGFloat)fontSize;
+(UIFont *)fontWithBaskervilleBolditalic:(CGFloat)fontSize;
#pragma mark - Bodoni 72
+(UIFont *)fontWithBodonisvtytwoitcttBook:(CGFloat)fontSize;
+(UIFont *)fontWithBodonisvtytwoitcttBookita:(CGFloat)fontSize;
+(UIFont *)fontWithBodonisvtytwoitcttBold:(CGFloat)fontSize;
#pragma mark - Bodoni 72 Oldstyle
+(UIFont *)fontWithBodonisvtytwoositcttBook:(CGFloat)fontSize;
+(UIFont *)fontWithBodonisvtytwoositcttBookit:(CGFloat)fontSize;
+(UIFont *)fontWithBodonisvtytwoositcttBold:(CGFloat)fontSize;
#pragma mark - Bodoni 72 Smallcaps
+(UIFont *)fontWithBodonisvtytwoscitcttBook:(CGFloat)fontSize;
#pragma mark - Bodoni Ornaments
+(UIFont *)fontWithBodoniornamentsitctt:(CGFloat)fontSize;
#pragma mark - Bradley Hand
+(UIFont *)fontWithBradleyhanditcttBold:(CGFloat)fontSize;
#pragma mark - Chalkboard SE
+(UIFont *)fontWithChalkboardseRegular:(CGFloat)fontSize;
+(UIFont *)fontWithChalkboardseLight:(CGFloat)fontSize;
+(UIFont *)fontWithChalkboardseBold:(CGFloat)fontSize;
#pragma mark - Chalkduster
+(UIFont *)fontWithChalkduster:(CGFloat)fontSize;
#pragma mark - Charter
+(UIFont *)fontWithCharterRoman:(CGFloat)fontSize;
+(UIFont *)fontWithCharterItalic:(CGFloat)fontSize;
+(UIFont *)fontWithCharterBold:(CGFloat)fontSize;
+(UIFont *)fontWithCharterBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithCharterBlack:(CGFloat)fontSize;
+(UIFont *)fontWithCharterBlackitalic:(CGFloat)fontSize;
#pragma mark - Cochin
+(UIFont *)fontWithCochin:(CGFloat)fontSize;
+(UIFont *)fontWithCochinItalic:(CGFloat)fontSize;
+(UIFont *)fontWithCochinBold:(CGFloat)fontSize;
+(UIFont *)fontWithCochinBolditalic:(CGFloat)fontSize;
#pragma mark - Copperplate
+(UIFont *)fontWithCopperplate:(CGFloat)fontSize;
+(UIFont *)fontWithCopperplateLight:(CGFloat)fontSize;
+(UIFont *)fontWithCopperplateBold:(CGFloat)fontSize;
#pragma mark - Courier
+(UIFont *)fontWithCourier:(CGFloat)fontSize;
+(UIFont *)fontWithCourierOblique:(CGFloat)fontSize;
+(UIFont *)fontWithCourierBold:(CGFloat)fontSize;
+(UIFont *)fontWithCourierBoldoblique:(CGFloat)fontSize;
#pragma mark - Courier New
+(UIFont *)fontWithCouriernewpsmt:(CGFloat)fontSize;
+(UIFont *)fontWithCouriernewpsItalicmt:(CGFloat)fontSize;
+(UIFont *)fontWithCouriernewpsBoldmt:(CGFloat)fontSize;
+(UIFont *)fontWithCouriernewpsBolditalicmt:(CGFloat)fontSize;
#pragma mark - Damascus
+(UIFont *)fontWithDamascus:(CGFloat)fontSize;
+(UIFont *)fontWithDamascuslight:(CGFloat)fontSize;
+(UIFont *)fontWithDamascusmedium:(CGFloat)fontSize;
+(UIFont *)fontWithDamascussemibold:(CGFloat)fontSize;
+(UIFont *)fontWithDamascusbold:(CGFloat)fontSize;
#pragma mark - Devanagari Sangam MN
+(UIFont *)fontWithDevanagarisangammn:(CGFloat)fontSize;
+(UIFont *)fontWithDevanagarisangammnBold:(CGFloat)fontSize;
#pragma mark - Didot
+(UIFont *)fontWithDidot:(CGFloat)fontSize;
+(UIFont *)fontWithDidotItalic:(CGFloat)fontSize;
+(UIFont *)fontWithDidotBold:(CGFloat)fontSize;
#pragma mark - DIN Alternate
+(UIFont *)fontWithDinalternateBold:(CGFloat)fontSize;
#pragma mark - DIN Condensed
+(UIFont *)fontWithDincondensedBold:(CGFloat)fontSize;
#pragma mark - Euphemia UCAS
+(UIFont *)fontWithEuphemiaucas:(CGFloat)fontSize;
+(UIFont *)fontWithEuphemiaucasItalic:(CGFloat)fontSize;
+(UIFont *)fontWithEuphemiaucasBold:(CGFloat)fontSize;
#pragma mark - Farah
+(UIFont *)fontWithFarah:(CGFloat)fontSize;
#pragma mark - Futura
+(UIFont *)fontWithFuturaMedium:(CGFloat)fontSize;
+(UIFont *)fontWithFuturaMediumitalic:(CGFloat)fontSize;
+(UIFont *)fontWithFuturaBold:(CGFloat)fontSize;
+(UIFont *)fontWithFuturaCondensedmedium:(CGFloat)fontSize;
+(UIFont *)fontWithFuturaCondensedextrabold:(CGFloat)fontSize;
#pragma mark - Galvji
+(UIFont *)fontWithGalvji:(CGFloat)fontSize;
+(UIFont *)fontWithGalvjiBold:(CGFloat)fontSize;
#pragma mark - Geeza Pro
+(UIFont *)fontWithGeezapro:(CGFloat)fontSize;
+(UIFont *)fontWithGeezaproBold:(CGFloat)fontSize;
#pragma mark - Georgia
+(UIFont *)fontWithGeorgia:(CGFloat)fontSize;
+(UIFont *)fontWithGeorgiaItalic:(CGFloat)fontSize;
+(UIFont *)fontWithGeorgiaBold:(CGFloat)fontSize;
+(UIFont *)fontWithGeorgiaBolditalic:(CGFloat)fontSize;
#pragma mark - Gill Sans
+(UIFont *)fontWithGillsans:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansItalic:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansLight:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansLightitalic:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansSemibold:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansSemibolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansBold:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithGillsansUltrabold:(CGFloat)fontSize;
#pragma mark - Helvetica
+(UIFont *)fontWithHelvetica:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaOblique:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaLight:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaLightoblique:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaBold:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaBoldoblique:(CGFloat)fontSize;
#pragma mark - Helvetica Neue
+(UIFont *)fontWithHelveticaneue:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueItalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueUltralightitalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueThin:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueThinitalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueLight:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueLightitalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueMedium:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueMediumitalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueBold:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueCondensedbold:(CGFloat)fontSize;
+(UIFont *)fontWithHelveticaneueCondensedblack:(CGFloat)fontSize;
#pragma mark - Hiragino Maru Gothic ProN
+(UIFont *)fontWithHiramarupronW4:(CGFloat)fontSize;
#pragma mark - Hiragino Mincho ProN
+(UIFont *)fontWithHiraminpronW3:(CGFloat)fontSize;
+(UIFont *)fontWithHiraminpronW6:(CGFloat)fontSize;
#pragma mark - Hiragino Sans
+(UIFont *)fontWithHiraginosansW3:(CGFloat)fontSize;
+(UIFont *)fontWithHiraginosansW6:(CGFloat)fontSize;
+(UIFont *)fontWithHiraginosansW7:(CGFloat)fontSize;
#pragma mark - Hoefler Text
+(UIFont *)fontWithHoeflertextRegular:(CGFloat)fontSize;
+(UIFont *)fontWithHoeflertextItalic:(CGFloat)fontSize;
+(UIFont *)fontWithHoeflertextBlack:(CGFloat)fontSize;
+(UIFont *)fontWithHoeflertextBlackitalic:(CGFloat)fontSize;
#pragma mark - Kailasa
+(UIFont *)fontWithKailasa:(CGFloat)fontSize;
+(UIFont *)fontWithKailasaBold:(CGFloat)fontSize;
#pragma mark - Kefa
+(UIFont *)fontWithKefaRegular:(CGFloat)fontSize;
#pragma mark - Khmer Sangam MN
+(UIFont *)fontWithKhmersangammn:(CGFloat)fontSize;
#pragma mark - Kohinoor Bangla
+(UIFont *)fontWithKohinoorbanglaRegular:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorbanglaLight:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorbanglaSemibold:(CGFloat)fontSize;
#pragma mark - Kohinoor Devanagari
+(UIFont *)fontWithKohinoordevanagariRegular:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoordevanagariLight:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoordevanagariSemibold:(CGFloat)fontSize;
#pragma mark - Kohinoor Gujarati
+(UIFont *)fontWithKohinoorgujaratiRegular:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorgujaratiLight:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorgujaratiBold:(CGFloat)fontSize;
#pragma mark - Kohinoor Telugu
+(UIFont *)fontWithKohinoorteluguRegular:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorteluguLight:(CGFloat)fontSize;
+(UIFont *)fontWithKohinoorteluguMedium:(CGFloat)fontSize;
#pragma mark - Lao Sangam MN
+(UIFont *)fontWithLaosangammn:(CGFloat)fontSize;
#pragma mark - Malayalam Sangam MN
+(UIFont *)fontWithMalayalamsangammn:(CGFloat)fontSize;
+(UIFont *)fontWithMalayalamsangammnBold:(CGFloat)fontSize;
#pragma mark - Marker Felt
+(UIFont *)fontWithMarkerfeltThin:(CGFloat)fontSize;
+(UIFont *)fontWithMarkerfeltWide:(CGFloat)fontSize;
#pragma mark - Menlo
+(UIFont *)fontWithMenloRegular:(CGFloat)fontSize;
+(UIFont *)fontWithMenloItalic:(CGFloat)fontSize;
+(UIFont *)fontWithMenloBold:(CGFloat)fontSize;
+(UIFont *)fontWithMenloBolditalic:(CGFloat)fontSize;
#pragma mark - Mishafi
+(UIFont *)fontWithDiwanmishafi:(CGFloat)fontSize;
#pragma mark - Mukta Mahee
+(UIFont *)fontWithMuktamaheeRegular:(CGFloat)fontSize;
+(UIFont *)fontWithMuktamaheeLight:(CGFloat)fontSize;
+(UIFont *)fontWithMuktamaheeBold:(CGFloat)fontSize;
#pragma mark - Myanmar Sangam MN
+(UIFont *)fontWithMyanmarsangammn:(CGFloat)fontSize;
+(UIFont *)fontWithMyanmarsangammnBold:(CGFloat)fontSize;
#pragma mark - Noteworthy
+(UIFont *)fontWithNoteworthyLight:(CGFloat)fontSize;
+(UIFont *)fontWithNoteworthyBold:(CGFloat)fontSize;
#pragma mark - Noto Nastaliq Urdu
+(UIFont *)fontWithNotonastaliqurdu:(CGFloat)fontSize;
+(UIFont *)fontWithNotonastaliqurduBold:(CGFloat)fontSize;
#pragma mark - Noto Sans Kannada
+(UIFont *)fontWithNotosanskannadaRegular:(CGFloat)fontSize;
+(UIFont *)fontWithNotosanskannadaLight:(CGFloat)fontSize;
+(UIFont *)fontWithNotosanskannadaBold:(CGFloat)fontSize;
#pragma mark - Noto Sans Myanmar
+(UIFont *)fontWithNotosansmyanmarRegular:(CGFloat)fontSize;
+(UIFont *)fontWithNotosansmyanmarLight:(CGFloat)fontSize;
+(UIFont *)fontWithNotosansmyanmarBold:(CGFloat)fontSize;
#pragma mark - Noto Sans Oriya
+(UIFont *)fontWithNotosansoriya:(CGFloat)fontSize;
+(UIFont *)fontWithNotosansoriyaBold:(CGFloat)fontSize;
#pragma mark - Optima
+(UIFont *)fontWithOptimaRegular:(CGFloat)fontSize;
+(UIFont *)fontWithOptimaItalic:(CGFloat)fontSize;
+(UIFont *)fontWithOptimaBold:(CGFloat)fontSize;
+(UIFont *)fontWithOptimaBolditalic:(CGFloat)fontSize;
+(UIFont *)fontWithOptimaExtrablack:(CGFloat)fontSize;
#pragma mark - Palatino
+(UIFont *)fontWithPalatinoRoman:(CGFloat)fontSize;
+(UIFont *)fontWithPalatinoItalic:(CGFloat)fontSize;
+(UIFont *)fontWithPalatinoBold:(CGFloat)fontSize;
+(UIFont *)fontWithPalatinoBolditalic:(CGFloat)fontSize;
#pragma mark - Papyrus
+(UIFont *)fontWithPapyrus:(CGFloat)fontSize;
+(UIFont *)fontWithPapyrusCondensed:(CGFloat)fontSize;
#pragma mark - Party LET
+(UIFont *)fontWithPartyletplain:(CGFloat)fontSize;
#pragma mark - PingFang HK
+(UIFont *)fontWithPingfanghkRegular:(CGFloat)fontSize;
+(UIFont *)fontWithPingfanghkUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfanghkThin:(CGFloat)fontSize;
+(UIFont *)fontWithPingfanghkLight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfanghkMedium:(CGFloat)fontSize;
+(UIFont *)fontWithPingfanghkSemibold:(CGFloat)fontSize;
#pragma mark - PingFang SC
+(UIFont *)fontWithPingfangscRegular:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangscUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangscThin:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangscLight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangscMedium:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangscSemibold:(CGFloat)fontSize;
#pragma mark - PingFang TC
+(UIFont *)fontWithPingfangtcRegular:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangtcUltralight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangtcThin:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangtcLight:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangtcMedium:(CGFloat)fontSize;
+(UIFont *)fontWithPingfangtcSemibold:(CGFloat)fontSize;
#pragma mark - Rockwell
+(UIFont *)fontWithRockwellRegular:(CGFloat)fontSize;
+(UIFont *)fontWithRockwellItalic:(CGFloat)fontSize;
+(UIFont *)fontWithRockwellBold:(CGFloat)fontSize;
+(UIFont *)fontWithRockwellBolditalic:(CGFloat)fontSize;
#pragma mark - Savoye LET
+(UIFont *)fontWithSavoyeletplain:(CGFloat)fontSize;
#pragma mark - Sinhala Sangam MN
+(UIFont *)fontWithSinhalasangammn:(CGFloat)fontSize;
+(UIFont *)fontWithSinhalasangammnBold:(CGFloat)fontSize;
#pragma mark - Snell Roundhand
+(UIFont *)fontWithSnellroundhand:(CGFloat)fontSize;
+(UIFont *)fontWithSnellroundhandBold:(CGFloat)fontSize;
+(UIFont *)fontWithSnellroundhandBlack:(CGFloat)fontSize;
#pragma mark - Symbol
+(UIFont *)fontWithSymbol:(CGFloat)fontSize;
#pragma mark - Tamil Sangam MN
+(UIFont *)fontWithTamilsangammn:(CGFloat)fontSize;
+(UIFont *)fontWithTamilsangammnBold:(CGFloat)fontSize;
#pragma mark - Thonburi
+(UIFont *)fontWithThonburi:(CGFloat)fontSize;
+(UIFont *)fontWithThonburiLight:(CGFloat)fontSize;
+(UIFont *)fontWithThonburiBold:(CGFloat)fontSize;
#pragma mark - Times New Roman
+(UIFont *)fontWithTimesnewromanpsmt:(CGFloat)fontSize;
+(UIFont *)fontWithTimesnewromanpsItalicmt:(CGFloat)fontSize;
+(UIFont *)fontWithTimesnewromanpsBoldmt:(CGFloat)fontSize;
+(UIFont *)fontWithTimesnewromanpsBolditalicmt:(CGFloat)fontSize;
#pragma mark - Trebuchet MS
+(UIFont *)fontWithTrebuchetms:(CGFloat)fontSize;
+(UIFont *)fontWithTrebuchetmsItalic:(CGFloat)fontSize;
+(UIFont *)fontWithTrebuchetmsBold:(CGFloat)fontSize;
+(UIFont *)fontWithTrebuchetBolditalic:(CGFloat)fontSize;
#pragma mark - Verdana
+(UIFont *)fontWithVerdana:(CGFloat)fontSize;
+(UIFont *)fontWithVerdanaItalic:(CGFloat)fontSize;
+(UIFont *)fontWithVerdanaBold:(CGFloat)fontSize;
+(UIFont *)fontWithVerdanaBolditalic:(CGFloat)fontSize;
#pragma mark - Zapf Dingbats
+(UIFont *)fontWithZapfdingbatsitc:(CGFloat)fontSize;
#pragma mark - Zapfino
+(UIFont *)fontWithZapfino:(CGFloat)fontSize;
@end
NS_ASSUME_NONNULL_END
| 39.017467 | 73 | 0.807219 |
4f1f7ee7590bbbfff25657204ef61a0a4d3bb683 | 581 | h | C | include/hpp/fcl/serialization/RSS.h | proyan/hpp-fcl | d63ea45eeb60f39822dc258ea29f8b837da7c044 | [
"BSD-3-Clause"
] | null | null | null | include/hpp/fcl/serialization/RSS.h | proyan/hpp-fcl | d63ea45eeb60f39822dc258ea29f8b837da7c044 | [
"BSD-3-Clause"
] | null | null | null | include/hpp/fcl/serialization/RSS.h | proyan/hpp-fcl | d63ea45eeb60f39822dc258ea29f8b837da7c044 | [
"BSD-3-Clause"
] | null | null | null | //
// Copyright (c) 2021 INRIA
//
#ifndef HPP_FCL_SERIALIZATION_RSS_H
#define HPP_FCL_SERIALIZATION_RSS_H
#include "hpp/fcl/BV/RSS.h"
#include "hpp/fcl/serialization/fwd.h"
namespace boost {
namespace serialization {
template <class Archive>
void serialize(Archive& ar, hpp::fcl::RSS& bv, const unsigned int /*version*/) {
ar& make_nvp("axes", bv.axes);
ar& make_nvp("Tr", bv.Tr);
ar& make_nvp("length", make_array(bv.length, 2));
ar& make_nvp("radius", bv.radius);
}
} // namespace serialization
} // namespace boost
#endif // ifndef HPP_FCL_SERIALIZATION_RSS_H
| 21.518519 | 80 | 0.714286 |
4f1ffcf84035ce982aa786bf5c379a31ce0711af | 850 | h | C | devmand/gateway/src/devmand/channels/cli/Spd2Glog.h | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 2 | 2020-11-05T18:58:26.000Z | 2021-02-09T06:42:49.000Z | devmand/gateway/src/devmand/channels/cli/Spd2Glog.h | remo5000/magma | 1d1dd9a23800a8e07b1ce016776d93e12430ec15 | [
"BSD-3-Clause"
] | 14 | 2019-11-15T12:01:18.000Z | 2019-12-12T14:37:42.000Z | devmand/gateway/src/devmand/channels/cli/Spd2Glog.h | 119Vik/magma-1 | 107a7b374466a837fc0a49b283ba9d6ff1d702e3 | [
"BSD-3-Clause"
] | 3 | 2019-11-15T15:56:25.000Z | 2019-11-21T10:34:59.000Z | // Copyright (c) 2019-present, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#pragma once
#include <spdlog/sinks/base_sink.h>
#include <mutex>
namespace devmand {
namespace channels {
namespace cli {
using namespace spdlog::level;
// Usage:
// auto logger = spdlog::create<Spd2Glog>("spd_logger");
// logger->info("log me");
class Spd2Glog : public spdlog::sinks::base_sink<std::mutex> {
public:
void toGlog(const spdlog::details::log_msg& msg);
protected:
void _sink_it(const spdlog::details::log_msg& msg) override;
void flush() override;
};
} // namespace cli
} // namespace channels
} // namespace devmand
| 25.757576 | 78 | 0.724706 |
4f20aae16cf69170aec9c74f6d6afde80ec7d7b1 | 429 | h | C | Simple OpenGL ES 1.1 example/Classes/Part6ProjectAppDelegate.h | JavaZava/iOS-OpenGLES-Stuff | 7a69adaa0a26e759ebc0a41114e8827901cc1e52 | [
"Unlicense",
"MIT"
] | 199 | 2015-01-17T10:16:29.000Z | 2022-03-07T04:24:38.000Z | Simple OpenGL ES 1.1 example/Classes/Part6ProjectAppDelegate.h | JavaZava/iOS-OpenGLES-Stuff | 7a69adaa0a26e759ebc0a41114e8827901cc1e52 | [
"Unlicense",
"MIT"
] | 2 | 2015-11-19T22:36:46.000Z | 2019-12-15T05:50:05.000Z | Simple OpenGL ES 1.1 example/Classes/Part6ProjectAppDelegate.h | JavaZava/iOS-OpenGLES-Stuff | 7a69adaa0a26e759ebc0a41114e8827901cc1e52 | [
"Unlicense",
"MIT"
] | 56 | 2015-01-09T03:10:34.000Z | 2019-11-25T06:24:16.000Z | //
// Part6ProjectAppDelegate.h
// Part6Project
//
// Created by jeff on 5/31/09.
// Copyright Jeff LaMarche 2009. All rights reserved.
//
@class GLViewController;
@interface Part6ProjectAppDelegate : NSObject <UIApplicationDelegate>
{
UIWindow *window;
GLViewController *controller;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet GLViewController *controller;
@end
| 22.578947 | 69 | 0.757576 |
4f233bfb12c44c620383c45344b5f3af259c79fd | 5,062 | h | C | code/MikoEngine/Renderer/Resource/Scene/SceneResourceManager.h | warzes/MikoEngine | 1199f59a71ab3dfcbea5d02238639db55eded0d4 | [
"MIT"
] | 5 | 2020-08-04T17:57:01.000Z | 2021-02-07T12:19:02.000Z | code/MikoEngine/Renderer/Resource/Scene/SceneResourceManager.h | warzes/MikoEngine | 1199f59a71ab3dfcbea5d02238639db55eded0d4 | [
"MIT"
] | null | null | null | code/MikoEngine/Renderer/Resource/Scene/SceneResourceManager.h | warzes/MikoEngine | 1199f59a71ab3dfcbea5d02238639db55eded0d4 | [
"MIT"
] | null | null | null |
#pragma once
//[-------------------------------------------------------]
//[ Includes ]
//[-------------------------------------------------------]
#include "Renderer/Resource/ResourceManager.h"
#include "Renderer/Context.h"
//[-------------------------------------------------------]
//[ Forward declarations ]
//[-------------------------------------------------------]
namespace Renderer
{
class ISceneFactory;
class SceneResource;
class IRenderer;
class SceneResourceLoader;
template <class TYPE, class LOADER_TYPE, typename ID_TYPE, uint32_t MAXIMUM_NUMBER_OF_ELEMENTS> class ResourceManagerTemplate;
}
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
namespace Renderer
{
//[-------------------------------------------------------]
//[ Global definitions ]
//[-------------------------------------------------------]
typedef uint32_t SceneResourceId; // POD scene resource identifier
//[-------------------------------------------------------]
//[ Classes ]
//[-------------------------------------------------------]
class SceneResourceManager final : public ResourceManager<SceneResource>
{
//[-------------------------------------------------------]
//[ Friends ]
//[-------------------------------------------------------]
friend class RendererImpl;
//[-------------------------------------------------------]
//[ Public methods ]
//[-------------------------------------------------------]
public:
[[nodiscard]] inline IRenderer& getRenderer() const
{
return mRenderer;
}
[[nodiscard]] inline const ISceneFactory& getSceneFactory() const
{
// We know that this pointer is always valid
SE_ASSERT(nullptr != mSceneFactory, "Invalid scene factory")
return *mSceneFactory;
}
void setSceneFactory(const ISceneFactory* sceneFactory);
[[nodiscard]] SceneResource* getSceneResourceByAssetId(AssetId assetId) const; // Considered to be inefficient, avoid method whenever possible
[[nodiscard]] SceneResourceId getSceneResourceIdByAssetId(AssetId assetId) const; // Considered to be inefficient, avoid method whenever possible
void loadSceneResourceByAssetId(AssetId assetId, SceneResourceId& sceneResourceId, IResourceListener* resourceListener = nullptr, bool reload = false, ResourceLoaderTypeId resourceLoaderTypeId = GetInvalid<ResourceLoaderTypeId>()); // Asynchronous
void destroySceneResource(SceneResourceId sceneResourceId);
void setInvalidResourceId(SceneResourceId& sceneResourceId, IResourceListener& resourceListener) const;
//[-------------------------------------------------------]
//[ Public virtual Renderer::IResourceManager methods ]
//[-------------------------------------------------------]
public:
[[nodiscard]] virtual uint32_t getNumberOfResources() const override;
[[nodiscard]] virtual IResource& getResourceByIndex(uint32_t index) const override;
[[nodiscard]] virtual IResource& getResourceByResourceId(ResourceId resourceId) const override;
[[nodiscard]] virtual IResource* tryGetResourceByResourceId(ResourceId resourceId) const override;
virtual void reloadResourceByAssetId(AssetId assetId) override;
inline virtual void update() override
{
// Nothing here
}
//[-------------------------------------------------------]
//[ Private virtual Renderer::IResourceManager methods ]
//[-------------------------------------------------------]
private:
[[nodiscard]] virtual IResourceLoader* createResourceLoaderInstance(ResourceLoaderTypeId resourceLoaderTypeId) override;
//[-------------------------------------------------------]
//[ Private methods ]
//[-------------------------------------------------------]
private:
explicit SceneResourceManager(IRenderer& renderer);
virtual ~SceneResourceManager() override;
explicit SceneResourceManager(const SceneResourceManager&) = delete;
SceneResourceManager& operator=(const SceneResourceManager&) = delete;
//[-------------------------------------------------------]
//[ Private data ]
//[-------------------------------------------------------]
private:
IRenderer& mRenderer; // Renderer instance, do not destroy the instance
const ISceneFactory* mSceneFactory; // Scene factory, always valid, do not destroy the instance
// Internal resource manager implementation
ResourceManagerTemplate<SceneResource, SceneResourceLoader, SceneResourceId, 16>* mInternalResourceManager;
};
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
} // Renderer
| 40.174603 | 249 | 0.492493 |
4f24b3fec2ec8b21938f5cd6f957988479d13670 | 360 | h | C | iOS/SuperScholar/SuperScholar/ClassModule/ClassEnvironment/Model/ClassEnvironmentManager.h | glq1453041018/MyTest | ef06d03b4302eb6a1796fc992e02410f4a5325b8 | [
"MIT"
] | null | null | null | iOS/SuperScholar/SuperScholar/ClassModule/ClassEnvironment/Model/ClassEnvironmentManager.h | glq1453041018/MyTest | ef06d03b4302eb6a1796fc992e02410f4a5325b8 | [
"MIT"
] | null | null | null | iOS/SuperScholar/SuperScholar/ClassModule/ClassEnvironment/Model/ClassEnvironmentManager.h | glq1453041018/MyTest | ef06d03b4302eb6a1796fc992e02410f4a5325b8 | [
"MIT"
] | null | null | null | //
// ClassEnvironmentManager.h
// SuperScholar
//
// Created by 骆亮 on 2018/3/22.
// Copyright © 2018年 SuperScholar. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ClassEnvironmentModel.h"
@interface ClassEnvironmentManager : NSObject
// !!!: 获取数据
+(void)requestDataResponse:(void(^)(NSArray *resArray,id error))responseBlock;
@end
| 20 | 78 | 0.730556 |
4f266c266a524c895a9c725c9ca710a79455b1de | 13,463 | h | C | HopsanGUI/GUIObjects/GUIContainerObject.h | mjfwest/hopsan | 77a0a1e69fd9588335b7e932f348972186cbdf6f | [
"Apache-2.0"
] | null | null | null | HopsanGUI/GUIObjects/GUIContainerObject.h | mjfwest/hopsan | 77a0a1e69fd9588335b7e932f348972186cbdf6f | [
"Apache-2.0"
] | null | null | null | HopsanGUI/GUIObjects/GUIContainerObject.h | mjfwest/hopsan | 77a0a1e69fd9588335b7e932f348972186cbdf6f | [
"Apache-2.0"
] | null | null | null | /*-----------------------------------------------------------------------------
Copyright 2017 Hopsan Group
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
The full license is available in the file GPLv3.
For details about the 'Hopsan Group' or information about Authors and
Contributors see the HOPSANGROUP and AUTHORS files that are located in
the Hopsan source code root directory.
-----------------------------------------------------------------------------*/
//!
//! @file GUIContainerObject.h
//! @author Flumes <flumes@lists.iei.liu.se>
//! @date 2010-01-01
//!
//! @brief Contains the GUI Container class (base class for Systems and Groups)
//!
//$Id$
#ifndef GUICONTAINEROBJECT_H
#define GUICONTAINEROBJECT_H
#include <QSlider>
#include "GUIModelObject.h"
#include "CopyStack.h"
#include "LogDataHandler2.h"
#include "GraphicsViewPort.h"
//Forward Declarations
class PlotWindow;
class ModelWidget;
class UndoStack;
class MainWindow;
class QGraphicsScene;
class Port;
class Widget;
class TextBoxWidget;
class QTableView;
class QRadioButton;
class ContainerObject : public ModelObject
{
friend class UndoStack; //! @todo Not sure about this, but the alternative would be to have lots and lots of access functions only used by undo stack...
Q_OBJECT
public:
enum ContainerEdgeEnumT {RightEdge, BottomEdge, LeftEdge, TopEdge};
ContainerObject(QPointF position, double rotation, const ModelObjectAppearance* pAppearanceData, SelectionStatusEnumT startSelected = Deselected, GraphicsTypeEnumT gfxType = UserGraphics, ContainerObject *pParentContainer=0, QGraphicsItem *pParent=0);
virtual ~ContainerObject();
bool isTopLevelContainer() const;
QStringList getSystemNameHieararchy() const;
void hasChanged();
ModelWidget *mpModelWidget; //!< @todo not public
//Signal/slot connection methods
virtual void makeMainWindowConnectionsAndRefresh();
virtual void unmakeMainWindowConnectionsAndRefresh();
// Scene and view related methods
QGraphicsScene *getContainedScenePtr();
void setGraphicsViewport(GraphicsViewPort vp);
GraphicsViewPort getGraphicsViewport() const;
// Core access
virtual CoreSystemAccess *getCoreSystemAccessPtr();
//GUIModelObjects and GUIWidgets methods
void takeOwnershipOf(QList<ModelObject*> &rModeObjectlist, QList<Widget*> &rWidgetList);
//GUIModelObject methods
ModelObject *addModelObject(QString fullTypeName, QPointF position, double rotation=0, SelectionStatusEnumT startSelected = Deselected, NameVisibilityEnumT nameStatus = UseDefault, UndoStatusEnumT undoSettings = Undo);
ModelObject *addModelObject(ModelObjectAppearance* pAppearanceData, QPointF position, double rotation=0, SelectionStatusEnumT startSelected = Deselected, NameVisibilityEnumT nameStatus = UseDefault, UndoStatusEnumT undoSettings = Undo);
ModelObject *getModelObject(const QString &rModelObjectName);
const QList<ModelObject* > getModelObjects() const;
Port *getModelObjectPort(const QString modelObjectName, const QString portName);
void deleteModelObject(const QString &rObjectName, UndoStatusEnumT undoSettings=Undo);
void renameModelObject(QString oldName, QString newName, UndoStatusEnumT undoSettings=Undo);
bool hasModelObject(const QString &rName) const;
void rememberSelectedModelObject(ModelObject *object);
void forgetSelectedModelObject(ModelObject *object);
QList<ModelObject *> getSelectedModelObjectPtrs();
bool isSubObjectSelected();
// Alias methods
bool setVariableAlias(const QString &rFullName, const QString &rAlias);
QString getVariableAlias(const QString &rFullName);
QString getFullNameFromAlias(const QString alias);
QStringList getAliasNames();
//GUIWidgets methods
TextBoxWidget *addTextBoxWidget(QPointF position, UndoStatusEnumT undoSettings=Undo);
TextBoxWidget *addTextBoxWidget(QPointF position, const int desiredWidgetId, UndoStatusEnumT undoSettings=Undo);
void deleteWidget(Widget *pWidget, UndoStatusEnumT undoSettings=Undo);
void deleteWidget(const int id, UndoStatusEnumT undoSettings=Undo);
void rememberSelectedWidget(Widget *widget);
void forgetSelectedWidget(Widget *widget);
QList<Widget *> getSelectedGUIWidgetPtrs();
// Parameter Methods
virtual bool setParameterValue(QString name, QString value, bool force=false);
virtual bool setParameter(const CoreParameterData &rParameter, bool force=false);
virtual bool setOrAddParameter(const CoreParameterData &rParameter, bool force=false);
virtual bool renameParameter(const QString oldName, const QString newName);
// NumHop Methods
void setNumHopScript(const QString &rScript);
QString getNumHopScript() const;
void runNumHopScript(const QString &rScript, bool printOutput, QString &rOutput);
//Handle connector methods
bool hasConnector(QString startComp, QString startPort, QString endComp, QString endPort);
Connector *findConnector(QString startComp, QString startPort, QString endComp, QString endPort);
void rememberSubConnector(Connector *pConnector);
void removeSubConnector(Connector* pConnector, UndoStatusEnumT undoSettings=Undo);
bool isConnectorSelected();
void rememberSelectedSubConnector(Connector *pConnector);
void forgetSelectedSubConnector(Connector *pConnector);
bool isCreatingConnector();
void cancelCreatingConnector();
void addOneConnectorLine(QPointF pos);
void removeOneConnectorLine(QPointF pos);
void makeConnectorDiagonal(bool diagonal);
void updateTempConnector(QPointF pos);
//Handle container appearance
QString getIconPath(const GraphicsTypeEnumT gfxType, const AbsoluteRelativeEnumT absrelType);
void setIconPath(const QString path, const GraphicsTypeEnumT gfxType, const AbsoluteRelativeEnumT absrelType);
ContainerEdgeEnumT findPortEdge(QPointF center, QPointF pt); //!< @todo maybe not public
virtual void refreshAppearance();
void refreshExternalPortsAppearanceAndPosition();
void calcSubsystemPortPosition(const double w, const double h, const double angle, double &x, double &y); //!< @todo maybe not public
//Plot and simulation results methods
LogDataHandler2 *getLogDataHandler();
//Undo/redo methods
UndoStack *getUndoStackPtr();
//Copy/paste methods
CopyStack *getDragCopyStackPtr();
//These (overloaded versions) are used in containerPropertiesDialog by systems
virtual size_t getNumberOfLogSamples();
virtual void setNumberOfLogSamples(size_t nSamples);
virtual double getLogStartTime() const;
virtual void setLogStartTime(const double logStartT);
//Model info
void setModelInfo(const QString &author, const QString &email, const QString &affiliation, const QString &description);
void getModelInfo(QString &author, QString &email, QString &affiliation, QString &description) const;
//Model and script file methods
void setModelFile(QString path);
const QFileInfo &getModelFileInfo() const;
QString getModelFilePath() const;
QString getModelPath() const;
void setScriptFile(QString path);
QString getScriptFile();
QStringList getModelObjectNames();
QList<Widget*> getWidgets();
Widget *getWidget(const int id);
void replaceComponent(QString name, QString newType);
//Numbered sections methods
void selectSection(int no, bool append=false);
void assignSection(int no);
//Losses methods
bool areLossesVisible();
QRadioButton *mpAvgPwrRadioButton;
public slots:
//Selection slots
void selectAll();
void deselectAll();
void deselectSelectedNameText();
QPointF getCenterPointFromSelection();
//Show/hide slots
void hideNames();
void showNames();
void toggleNames(bool value);
void toggleSignals(bool value);
void showSubcomponentPorts(bool doShowThem);
//Connector slots
Connector* createConnector(Port *pPort, UndoStatusEnumT undoSettings=Undo);
Connector* createConnector(Port *pPort1, Port *pPort2, UndoStatusEnumT undoSettings=Undo);
//Copy/paste slots
void cutSelected(CopyStack *xmlStack = 0);
void copySelected(CopyStack *xmlStack = 0);
void paste(CopyStack *xmlStack = 0);
//Alignment slots
void alignX();
void alignY();
void distributeX();
void distributeY();
//Undo/redo slots
void undo();
void redo();
void clearUndo();
void setUndoDisabled(bool disabled, bool dontAskJustDoIt=false);
void setUndoEnabled(bool enabled, bool dontAskJustDoIt=false);
void setSaveUndo(bool save);
bool isUndoEnabled();
bool getSaveUndo();
void updateMainWindowButtons();
//Appearance slots
void setGfxType(GraphicsTypeEnumT gfxType);
GraphicsTypeEnumT getGfxType();
bool areSubComponentPortsShown();
bool areSubComponentNamesShown();
bool areSignalsHidden();
//Properties slots
void openPropertiesDialogSlot();
//Enter and exit a container object
void enterContainer();
void exitContainer();
//Rotate and flip slots
void rotateSubObjects90cw();
void rotateSubObjects90ccw();
void flipSubObjectsHorizontal();
void flipSubObjectsVertical();
//Losses
void showLosses(bool show);
void showLossesFromDialog();
void hideLosses();
//Simulation time measurements
void measureSimulationTime();
void plotMeasuredSimulationTime();
void exportMesasuredSimulationTime();
//External/internal subsystems
bool isAncestorOfExternalSubsystem();
bool isExternal();
QList<Connector*> getSubConnectorPtrs();
signals:
//Selection signals
void deselectAllNameText();
void deselectAllGUIObjects();
void selectAllGUIObjects();
void deselectAllConnectors();
void selectAllConnectors();
//Hide/show name text
void hideAllNameText();
void showAllNameText();
void showOrHideAllNameText(bool doShow); //!< @todo use this instead of two separate show hide
// Hide/Show subcomponent ports
void showOrHideAllSubComponentPorts(bool doShow);
//Hide/show signals components
void showOrHideSignals(bool doShow);
//Other signals
void checkMessages();
void deleteSelected();
void setAllGfxType(GraphicsTypeEnumT);
void componentChanged();
void connectorRemoved();
void rotateSelectedObjectsRight();
void rotateSelectedObjectsLeft();
void flipSelectedObjectsHorizontal();
void flipSelectedObjectsVertical();
void systemParametersChanged();
void aliasChanged(const QString &rFullName, const QString &rAlias);
protected:
//Protected methods
virtual Port* createRefreshExternalPort(QString portName);
virtual void renameExternalPort(QString oldName, QString newName);
//virtual void openPropertiesDialog();
void clearContents();
void forgetSubConnector(Connector *pConnector);
void refreshInternalContainerPortGraphics();
//Help function for creating container ports
virtual void addExternalContainerPortObject(ModelObject *pModelObject);
//Protected overloaded Qt methods
//virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
//virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
//Scene pointer and graphics viewport
QGraphicsScene *mpScene;
GraphicsViewPort mGraphicsViewPort;
//Model and script file members
QFileInfo mModelFileInfo;
QString mScriptFilePath;
QString mNumHopScript;
//Model object members
typedef QHash<QString, ModelObject*> ModelObjectMapT;
ModelObjectMapT mModelObjectMap;
ModelObject *mpTempGUIModelObject;
QList<ModelObject *> mSelectedModelObjectsList;
//Connector members
QList<Connector *> mSelectedSubConnectorsList;
QList<Connector *> mSubConnectorList;
Connector *mpTempConnector;
bool mIsCreatingConnector;
//Widget members
QMap<size_t, Widget *> mWidgetMap;
QList<Widget *> mSelectedWidgetsList;
//Contained object appearance members
bool mShowSubComponentPorts;
bool mShowSubComponentNames;
bool mSignalsHidden;
GraphicsTypeEnumT mGfxType;
//Undo-redo members
UndoStack *mpUndoStack;
bool mUndoDisabled;
bool mSaveUndoStack;
//Copy-paste members
CopyStack *mpDragCopyStack;
double mPasteOffset;
//Numbered sections members
QList< QList<ModelObject *> > mSection;
//Losses members
bool mLossesVisible;
QDialog *mpLossesDialog;
QSlider *mpMinLossesSlider;
QRadioButton *mpEnergyRadioButton;
//Model information
QString mAuthor;
QString mEmail;
QString mAffiliation;
QString mDescription;
//Time measurement dialog
QTableView *mpComponentTable;
QTableView *mpTypeTable;
};
#endif // GUICONTAINEROBJECT_H
| 35.428947 | 255 | 0.744262 |
4f28d04dcf6c825bbd951350f881e578737954de | 6,173 | h | C | sauce/injector.h | b4hand/sauce | 8e1528944bc1bd42f4c1cb36d1bebd04e4f0447b | [
"MIT"
] | null | null | null | sauce/injector.h | b4hand/sauce | 8e1528944bc1bd42f4c1cb36d1bebd04e4f0447b | [
"MIT"
] | null | null | null | sauce/injector.h | b4hand/sauce | 8e1528944bc1bd42f4c1cb36d1bebd04e4f0447b | [
"MIT"
] | null | null | null | #ifndef SAUCE_INJECTOR_H_
#define SAUCE_INJECTOR_H_
#include <cassert>
#include <string>
#include <sauce/memory.h>
#include <sauce/named.h>
#include <sauce/scopes.h>
#include <sauce/internal/base_injector.h>
#include <sauce/internal/key.h>
#include <sauce/internal/locker_factory.h>
#include <sauce/internal/scope_cache.h>
#include <sauce/internal/type_id.h>
namespace sauce {
class Modules;
class Injector;
namespace internal {
class ImplicitBindings;
class InjectorFriend;
typedef sauce::shared_ptr<Injector> InjectorPtr;
}
class Injector {
i::TypeId const scopeKey;
i::ScopeCache scopeCache;
sauce::weak_ptr<Injector> weak;
i::InjectorPtr const next;
sauce::shared_ptr<i::BaseInjector<i::ImplicitBindings> > const base;
friend class Modules;
friend class i::InjectorFriend;
Injector(i::TypeId scopeKey, i::InjectorPtr next):
scopeKey(scopeKey),
scopeCache(),
weak(),
next(next),
base() {}
Injector(sauce::shared_ptr<i::BaseInjector<i::ImplicitBindings> > const base):
scopeKey(i::typeIdOf<SingletonScope>()),
scopeCache(),
weak(),
next(),
base(base) {}
void setSelfPtr(i::InjectorPtr shared) {
assert(shared.get() == this);
weak = shared;
}
i::InjectorPtr getSelf() const {
i::InjectorPtr self = weak.lock();
assert(self.get() == this);
return self;
}
template<typename Dependency>
void validateAcyclic(bool validateProviding, i::InjectorPtr injector, i::TypeIds & ids, std::string const name) {
if (base.get() == NULL) {
next->validateAcyclic<Dependency>(validateProviding, injector, ids, name);
} else {
base->validateAcyclic<Dependency>(validateProviding, injector, ids, name);
}
}
template<typename Dependency>
void inject(typename i::Key<Dependency>::Ptr & injected, i::InjectorPtr injector, std::string const name) {
if (base.get() == NULL) {
next->inject<Dependency>(injected, injector, name);
} else {
base->inject<Dependency>(injected, injector, name);
}
}
/**
* Create an RAII synchronization lock.
*/
sauce::auto_ptr<i::Lock> acquireLock() {
if (base.get() == NULL) {
return next->acquireLock();
} else {
return base->acquireLock();
}
}
template<typename Scope>
void eagerlyInject(i::InjectorPtr injector) {
if (base.get() == NULL) {
next->eagerlyInject<Scope>(injector);
} else {
base->eagerlyInject<Scope>(injector);
}
}
template<typename Dependency>
void cache(typename i::Key<Dependency>::Ptr pointer, i::TypeId dependencyScopeKey) {
if (scopeKey == dependencyScopeKey) {
scopeCache.template put<Dependency>(pointer);
} else if (next.get() == NULL) {
dependencyScopeKey.throwOutOfScopeException();
} else {
next->cache<Dependency>(pointer, dependencyScopeKey);
}
}
template<typename Dependency>
bool probe(typename i::Key<Dependency>::Ptr & out, i::TypeId dependencyScopeKey) const {
if (scopeKey == dependencyScopeKey) {
return scopeCache.template get<Dependency>(out);
} else if (next.get() == NULL) {
dependencyScopeKey.throwOutOfScopeException();
return false; // never reached
} else {
return next->probe<Dependency>(out, dependencyScopeKey);
}
}
template<typename Scope>
bool alreadyInScope() const {
if (scopeKey == i::typeIdOf<Scope>()) {
return true;
} else if (next.get() == NULL) {
return false;
} else {
return next->alreadyInScope<Scope>();
}
}
public:
template<typename Dependency>
void inject(typename i::Key<Dependency>::Ptr & injected, std::string const name = unnamed()) {
typedef typename i::Key<Dependency>::Ptr Ptr;
typedef typename i::Key<Dependency>::Normalized Normalized;
sauce::auto_ptr<i::Lock> lock = acquireLock();
i::TypeIds ids;
bool validateProviding = (injected.get() == NULL);
validateAcyclic<Normalized>(validateProviding, getSelf(), ids, name); // TODO Make this check optional.
inject<Normalized>(injected, getSelf(), name);
}
template<typename Iface, typename Name>
void inject(typename i::Key<Named<Iface, Name> >::Ptr & injected, std::string const name = unnamed()) {
inject<Named<Iface, Name> >(injected, name);
}
template<typename Dependency>
typename i::Key<Dependency>::Ptr get(std::string const name = unnamed()) {
typename i::Key<Dependency>::Ptr injected;
inject<Dependency>(injected, name);
return injected;
}
template<typename Iface, typename Name>
typename i::Key<Named<Iface, Name> >::Ptr get(std::string const name = unnamed()) {
return get<Named<Iface, Name> >(name);
}
template<typename Scope>
i::InjectorPtr enter() const {
if (alreadyInScope<Scope>()) {
throw AlreadyInScopeExceptionFor<Scope>();
}
i::InjectorPtr scoped(new Injector(i::typeIdOf<Scope>(), getSelf()));
scoped->setSelfPtr(scoped);
return scoped;
}
i::InjectorPtr exit() const {
if (next.get() == NULL) {
throw ExitingSingletonScopeException();
} else {
return next;
}
}
template<typename Scope>
void eagerlyInject() {
sauce::auto_ptr<i::Lock> lock = acquireLock();
eagerlyInject<Scope>(getSelf());
}
};
namespace internal {
class InjectorFriend {
protected:
template<typename Dependency>
void validateAcyclicHelper(InjectorPtr injector, TypeIds & ids, std::string const name) const {
injector->validateAcyclic<Dependency>(true, injector, ids, name);
}
template<typename Dependency>
void injectHelper(typename Key<Dependency>::Ptr & injected, InjectorPtr injector, std::string const name) const {
injector->inject<Dependency>(injected, injector, name);
}
template<typename Dependency>
void cache(InjectorPtr injector, typename Key<Dependency>::Ptr injected, i::TypeId scope) const {
injector->template cache<Dependency>(injected, scope);
}
template<typename Dependency>
bool probe(InjectorPtr injector, typename Key<Dependency>::Ptr & injected, i::TypeId scope) const {
return injector->template probe<Dependency>(injected, scope);
}
};
}
}
#endif // SAUCE_INJECTOR_H_
| 27.314159 | 115 | 0.679572 |
4f2aa2a14dde16b198f68cb6aa259e825b0a4bcd | 1,042 | h | C | src/non-copyable.h | muflihun/residue | 4fb7506b72335bd931e1d6364d1d2690b5b0fcb5 | [
"Apache-2.0"
] | 18 | 2017-02-11T22:10:13.000Z | 2018-10-07T00:46:45.000Z | src/non-copyable.h | amrayn/residue | 4fb7506b72335bd931e1d6364d1d2690b5b0fcb5 | [
"Apache-2.0"
] | 46 | 2017-03-21T06:22:44.000Z | 2018-09-24T05:00:02.000Z | src/non-copyable.h | amrayn/residue | 4fb7506b72335bd931e1d6364d1d2690b5b0fcb5 | [
"Apache-2.0"
] | 5 | 2020-11-06T10:50:39.000Z | 2021-11-06T01:47:18.000Z | //
// non-copyable.h
// Residue
//
// Copyright 2017-present Amrayn Web Services
// https://amrayn.com
//
// Author: @abumusamq
//
// 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 NonCopyable_h
#define NonCopyable_h
class NonCopyable {
protected:
NonCopyable() = default;
private:
NonCopyable(const NonCopyable&) = delete;
NonCopyable& operator=(const NonCopyable&) = delete;
NonCopyable(NonCopyable&&) = delete;
NonCopyable& operator=(NonCopyable&&) = delete;
};
#endif /* NonCopyable_h */
| 28.944444 | 76 | 0.714971 |