repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
turesnake/tprPixelGames
src/Engine/camera/ViewingBox.h
<gh_stars>100-1000 /* * ========================= ViewingBox.h ========================== * -- tpr -- * CREATE -- 2019.01.22 * MODIFY -- * ---------------------------------------------------------- * camera.v...
turesnake/tprPixelGames
src/Script/gameObjs/majorGos/rocks/BreakStone.h
/* * ======================= BreakStone.h ========================== * -- tpr -- * CREATE -- 2019.12.31 * MODIFY -- * ---------------------------------------------------------- */ #ifndef TPR_GO_BREAK_STONE_H #...
turesnake/tprPixelGames
src/Engine/collision/signInMapEnts/SignInMapEnts_Square_Type.h
/* * ====================== SignInMapEnts_Square_Type.h ========================== * -- tpr -- * CREATE -- 2020.02.19 * MODIFY -- * ---------------------------------------------------------- */ #ifndef TPR_SIGN...
turesnake/tprPixelGames
src/Engine/ecoSys/EcoObj_ReadOnly.h
<gh_stars>100-1000 /* * ========================== EcoObj_ReadOnly.h ======================= * -- tpr -- * CREATE -- 2019.04.27 * MODIFY -- * ---------------------------------------------------------- */ #ifnde...
turesnake/tprPixelGames
src/Script/uiGos/Button_SceneBegin_Pointer.h
/* * ================ Button_SceneBegin_Pointer.h ========================== * -- tpr -- * CREATE -- 2019.08.25 * MODIFY -- * ---------------------------------------------------------- */ #ifndef TPR_UI_BUTTON_...
turesnake/tprPixelGames
src/Engine/blueprint/YardBlueprint.h
/* * ======================= YardBlueprint.h ======================= * -- tpr -- * CREATE -- 2019.12.02 * MODIFY -- * ---------------------------------------------------------- */ #ifndef TPR_YARD_BLUE_PRINT_H ...
comfortablynick/ctodo
include/common.h
#include <fmt/format.h> #include <iostream> #include <memory> #include <stddef.h> #include <string> #include <vector> /// @brief Data structure to hold common program options struct options { std::string cmd, verbosity; bool quiet, getline; }; std::ostream& operator<<(std::ostream&, std::shared_ptr<options>);...
clayne/clib-1
test/package/package-new.c
<reponame>clayne/clib-1<filename>test/package/package-new.c #include "clib-cache.h" #include "clib-package.h" #include "describe/describe.h" #include "rimraf/rimraf.h" int main() { clib_cache_init(100); rimraf(clib_cache_dir()); describe("clib_package_new") { char json[] = "{" " \"name\":...
clayne/clib-1
test/package/package-parse-version.c
#include "clib-cache.h" #include "clib-package.h" #include "describe/describe.h" #include "rimraf/rimraf.h" int main() { clib_cache_init(100); rimraf(clib_cache_dir()); describe("clib_package_parse_version") { char *version = NULL; it("should return NULL when given a bad slug") { assert(NULL == c...
clayne/clib-1
test/package/package-url.c
#include "clib-cache.h" #include "clib-package.h" #include "describe/describe.h" #include "rimraf/rimraf.h" int main() { clib_cache_init(100); rimraf(clib_cache_dir()); describe("clib_package_url") { it("should return NULL when given a bad author") { assert(NULL == clib_package_url(NULL, "name", "vers...
clayne/clib-1
test/package/package-parse-author.c
#include "clib-cache.h" #include "clib-package.h" #include "describe/describe.h" #include <string.h> #include "rimraf/rimraf.h" int main() { clib_cache_init(100); rimraf(clib_cache_dir()); describe("clib_package_parse_author") { char *author = NULL; it("should return NULL when given a bad slug") { ...
clayne/clib-1
test/package/package-load-from-manifest.c
#include "clib-cache.h" #include "clib-package.h" #include "describe/describe.h" #include "rimraf/rimraf.h" int main() { clib_cache_init(100); rimraf(clib_cache_dir()); describe("clib_package_load_from_manifest") { it("should load a package from a file if available") { int verbose = 0; clib_pack...
lliunix/rt-thread
bsp/raspberry-pico/libcpu/cpuport_smp.c
<filename>bsp/raspberry-pico/libcpu/cpuport_smp.c #include <rthw.h> #include <rtthread.h> #ifdef RT_USING_SMP #include "hardware/structs/sio.h" #include "hardware/irq.h" #include "hardware/sync.h" #include "pico/multicore.h" #include "board.h" #include "hardware/structs/systick.h" int rt_hw_cpu_id(void) { retur...
amdprophet/WS2812FX
WS2812FX.h
<gh_stars>1-10 /* WS2812FX.h - Library for WS2812 LED effects. <NAME> - 2016 www.aldick.org FEATURES * A lot of blinken modes and counting * WS2812FX can be used as drop-in replacement for Adafruit NeoPixel Library NOTES * Uses the Adafruit NeoPixel library. Get it here: https://github.com/...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigationView+StausBarClick.h
// // LEGONavigationView+StausBarClick.h // FilmCamera // // Created by 杨庆人 on 2019/6/1. // Copyright © 2019年 The last stand. All rights reserved. // #import "LEGONavigationView.h" typedef void(^stausbarClickCallback)(void); NS_ASSUME_NONNULL_BEGIN @interface LEGONavigationView (StausBarClick) - (void)addStausBa...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigationController.h
// // LEGONavigationController.h // FilmCamera // // Created by 杨庆人 on 2019/5/31. // Copyright © 2019年 The last stand. All rights reserved. // #import <UIKit/UIKit.h> #import "LEGONavigation.h" NS_ASSUME_NONNULL_BEGIN @interface LEGONavigationController : UINavigationController @end NS_ASSUME_NONNULL_END
legokit/LEGONavigationController
Example/Pods/Target Support Files/LEGONavigationController/LEGONavigationController-umbrella.h
#ifdef __OBJC__ #import <UIKit/UIKit.h> #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif #import "LEGONavigation.h" #import "LEGONavigationController.h" #import "LEGONavigationUtils.h" #import "LEGONavigationView+N...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigation.h
<reponame>legokit/LEGONavigationController<gh_stars>0 // // LEGONavigation.h // FilmCamera // // Created by 杨庆人 on 2019/5/31. // Copyright © 2019年 The last stand. All rights reserved. // #ifndef LEGONavigation_h #define LEGONavigation_h #import "LEGONavigationUtils.h" #import "LEGONavigationController.h" #import ...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigationView+NavigationItem.h
<reponame>legokit/LEGONavigationController<filename>LEGONavigationController/Classes/LEGONavigationView+NavigationItem.h<gh_stars>0 // // LEGONavigationView+NavigationItem.h // FilmCamera // // Created by 杨庆人 on 2019/6/1. // Copyright © 2019年 The last stand. All rights reserved. // #import "LEGONavigationView.h" ...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigationUtils.h
<gh_stars>0 // // LEGONavigationUtils.h // FilmCamera // // Created by 杨庆人 on 2019/5/31. // Copyright © 2019年 The last stand. All rights reserved. // #ifndef LEGONavigationUtils_h #define LEGONavigationUtils_h #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #define IS_IPHONE_X \ ({BOOL isPhoneX = NO;\...
legokit/LEGONavigationController
LEGONavigationController/Classes/UIViewController+LEGONavigationView.h
// // UIViewController+LBNavigationView.h // FilmCamera // // Created by 杨庆人 on 2019/5/31. // Copyright © 2019年 The last stand. All rights reserved. // #import <UIKit/UIKit.h> #import "LEGONavigation.h" NS_ASSUME_NONNULL_BEGIN @interface UIViewController (LBNavigationView) /** * 当前的导航条(首次调用该 getter 方法则添加到当前 View...
legokit/LEGONavigationController
LEGONavigationController/Classes/LEGONavigationView.h
<reponame>legokit/LEGONavigationController<filename>LEGONavigationController/Classes/LEGONavigationView.h<gh_stars>0 // // LEGONavigationView.h // FilmCamera // // Created by 杨庆人 on 2019/6/1. // Copyright © 2019年 The last stand. All rights reserved. // #import <UIKit/UIKit.h> @class LEGONavigationButton; typedef...
roatis2/IoT
demos/st/stm32l475_discovery/common/application_code/sensor_data.c
<filename>demos/st/stm32l475_discovery/common/application_code/sensor_data.c /** ****************************************************************************** * @file sensor_data.c * @author MCD Application Team * @version V1.0.0 * @date 13-Feb-2019 * @brief A simple example demonstration how to p...
BiscayRobin/brainIt
src/arguments.h
#ifndef __ARGUMENTS_H #define __ARGUMENTS_H #include <stdbool.h> typedef struct { char *in_file; char *out_file; bool isCompiled; } args_t; int argument_parse(int argc, char **argv, args_t *args_result); #endif // __ARGUMENTS_H
BiscayRobin/brainIt
src/bf_runtime.h
#ifndef __BF_RUNTIME_H #define __BF_RUNTIME_H #include <stdlib.h> #define BF_STDOUT_ERROR 2 #define BF_STDIN_ERROR 1 #define BF_SUCCESS 0 typedef struct { char tape[30000]; size_t head_idx; } bf_runtime_t; int bf_run(char *source, size_t source_length); #endif // __BF_RUNTIME_H
BiscayRobin/brainIt
src/utils.h
<filename>src/utils.h #ifndef __UTILS_H #define __UTILS_H #include <stdio.h> size_t file_to_buffer(char *stream, char **buffer_addr); #endif // __UTILS_H
BiscayRobin/brainIt
src/arguments.c
<filename>src/arguments.c #include "arguments.h" #include <stdio.h> #include <stdlib.h> #include <argp.h> error_t parse_opt(int key, char *arg, struct argp_state *state) { args_t *arguments = state->input; switch (key) { case 'o': arguments->out_file = arg; break; case 'c': ...
BiscayRobin/brainIt
src/bf_runtime.c
#include <stdio.h> #include "bf_runtime.h" int bf_run(char *source, size_t source_length) { bf_runtime_t bf_runtime = {0}; size_t source_idx = 0; while (source_idx < source_length) { char curr_op = source[source_idx]; size_t loop_depth = 0; switch (curr_op) { c...
BiscayRobin/brainIt
src/utils.c
#include "utils.h" #include <stdlib.h> #include <errno.h> #include <string.h> size_t file_to_buffer(char *file_path, char **buffer_addr) { FILE *file_stream = fopen(file_path, "rb"); if (!file_stream) { fprintf(stderr, "%s: %s\n", file_path, strerror(errno)); exit(EXIT_FAILURE); } ...
BiscayRobin/brainIt
src/main.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "bf_runtime.h" #include "arguments.h" #include "utils.h" int main(int argc, char **argv) { int error_code = 0; args_t arguments = {0}; argument_parse(argc, argv, &arguments); char *source_code; size_t source_length = file_to_bu...
hdaikoku/hadoop
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/examples/c/connect_cancel/connect_cancel.c
<gh_stars>1-10 /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "Licens...
awesomemachinelearning/flashlight
flashlight/common/CudaUtils.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * 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. */ #pragma once #include <af/cuda.h> /// usage: `FL_CUDA_CHECK(cudaError_t err[, const char* prefix])...
RenanBasilio/ArgsParser
include/argsparser/typed_input_container.h
/** * typed_input_container.h * * This file contains the definition of the template container class * TypedInputContainer, used to process argument values when the argument type * can be specified. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <argsparser/input_container.h> #in...
RenanBasilio/ArgsParser
include/argsparser/value_wrapper.h
/** * value_wrapper.h * * This file contains the declaration of the ValueWrapper struct, a utility * class that is implicitly convertible to bool or string for returning * argument values. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <argsparser/common.h> namespace ArgsParse...
RenanBasilio/ArgsParser
include/argsparser/token.h
/** * token.h * * This file contains the declaration of the Token class and related global * defines. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <argsparser/common.h> namespace ArgsParser { /** * This struct is the type of the id tokens returned by registration meth...
RenanBasilio/ArgsParser
include/argsparser/typed_value_wrapper.h
<filename>include/argsparser/typed_value_wrapper.h /** * typed_value_wrapper.h * * This file contains the declaration of the TypedValueWrapper struct, a template * utility that is implicitly convertible to bool or a user defined type used for * returning typed argument values. * * Copyright (C) 2018 <NAME>. Al...
RenanBasilio/ArgsParser
include/argsparser/common.h
/** * common.h * * This file contains common definitions and declarations used throughout the library. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <memory> #include <string> #include <vector> #include <exception> #include <functional> #include <iostream> namespace ArgsParser ...
RenanBasilio/ArgsParser
include/argsparser/autohelp.h
/** * autohelp.h * * This file contains the declaration of methods used to automatically * generate usage help text. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <iostream> #include <argsparser/parser.h> namespace ArgsParser { /** * This method outputs usage help tex...
RenanBasilio/ArgsParser
include/argsparser/parser.h
<reponame>RenanBasilio/ArgsParser /** * parser.h * * This file contains the class declaration for the base Parser class. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <unordered_map> #include <limits> #include <token.h> #include <argsparser/typed_input_container.h> #include <arg...
RenanBasilio/ArgsParser
include/argsparser/util.h
<gh_stars>1-10 /** * util.h * * This file contains the declaration of utility methods in the ArgsParser * namespace. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <string> #include <iostream> #include <stdexcept> #include <exception> namespace ArgsTools { /** * This m...
RenanBasilio/ArgsParser
include/argsparser/container.h
/** * container.h * * This file contains the public interface of the container class used to store * data. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <algorithm> #include <argsparser/value_wrapper.h> #include <argsparser/common.h> namespace ArgsParser { /** * This ...
RenanBasilio/ArgsParser
include/argsparser/parserImpl.h
/** * parserImpl.h * * This file contains the declarations of the internals of the Parser class. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #include <argsparser/parser.h> namespace ArgsParser { struct Parser::ParserImpl{ // This string stores the parsed name of the program. std...
RenanBasilio/ArgsParser
include/argsparser/input_container.h
<filename>include/argsparser/input_container.h /** * input_container.h * * This file contains the declaration of the InputContainer class, used to * process arguments where the input does not have a user-specified type and * is therefore treated as a string. * * Copyright (C) 2018 <NAME>. All rights reserved. ...
RenanBasilio/ArgsParser
include/argsparser.h
/** * argsparser.h * * This file includes all headers from the argsparser library. * * Copyright (C) 2018 <NAME>. All rights reserved. */ #pragma once #include <argsparser/autohelp.h> #include <argsparser/common.h> #include <argsparser/container.h> #include <argsparser/input_container.h> #include <argsparser/...
GCZhang/Profugus
packages/Utils/rng/sprng/makeseed.c
#include <time.h> #include <Utils/config.h> #if __STDC__ int make_new_seed() #else int make_new_seed() #endif { time_t tp; struct tm *temp; unsigned int temp2, temp3; static unsigned int temp4 = 0xe0e1; time(&tp); temp = localtime(&tp); temp2 = (temp->tm_sec<<26)+(temp->tm_min<<20)+(temp->tm_hour<<15)...
GCZhang/Profugus
packages/Utils/rng/sprng/fwrap.h
#ifndef Utils_rng_sprng_fwrap_h #define Utils_rng_sprng_fwrap_h #include <mc/config.h> /************************************************************************/ /************************************************************************/ /* Inter-language Naming Convention Problem Solution */ /* ...
GCZhang/Profugus
packages/Utils/rng/sprng/fwrap_.h
#include <mc/config.h> #include "fwrap.h" /************************************************************************/ /************************************************************************/ /* */ /* This package of C wrappers is intended to be called from a */ /* FORTRAN program. The main purpose of the ...
GCZhang/Profugus
packages/Utils/rng/sprng/lfg.c
<gh_stars>10-100 /*CRCrem: 1571591324 This is an optional comment */ /*************************************************************************/ /*************************************************************************/ /* A MULTI-PROCESSOR LAGGED-FIBONACCI RANDOM NUMBER GENERATION SYSTEM */ /* ...
thearchitector/experiments
fizzbuzz/fizzbuzz.c
#include <stdio.h> #include <stdint.h> int main(int argc, char* argv[]) { uint_fast8_t flag = 0; // run for numbers 1-100 for(int i = 1; i <= 100; ++i) { // special print conditions (Fizz, Buzz, FizzBuzz) if(i % 3 == 0 && (flag = 1)) printf("Fizz"); if(i % 5 == 0 && (flag = 1)) printf("Buzz"); ...
liuanlin-mx/net_log
net_log.h
<reponame>liuanlin-mx/net_log /***************************************************************************** * * * Copyright (C) 2021, <NAME>. * * ...
pjamison1/PiWiFi
PiWiFiService/src/appsettings.h
/* Copyright (c) 2013 BlackBerry Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
hugo3132/EmlaLockSafe
software/src/emlalock/EmlaLockApi.h
<reponame>hugo3132/EmlaLockSafe /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../configuration/Configuration.h" #define ARDUINOJSON_USE_LONG_LONG 1 #define ARDUINOJSON_DECODE_UNICODE 1 #include <Arduino.h> #include <ArduinoJson.h> #include <HTTPClient.h> #include <Thread.h>...
hugo3132/EmlaLockSafe
software/src/views/UnlockedMainMenu.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include "ViewStore.h" #include <Esp.h> #include <MenuView.h> namespace views { /** * @brief Main menu as long as there is no active session */ class UnlockedMainMenu : public lcd::MenuView { public: /** * @br...
hugo3132/EmlaLockSafe
software/src/views/SelectDisplayTimeLeft.h
<reponame>hugo3132/EmlaLockSafe<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../LockState.h" #include "ViewStore.h" #include <MenuView.h> #include <time.h> namespace views { /** * @brief selection menu if the time passed should be displayed or not */ class S...
hugo3132/EmlaLockSafe
software/src/views/EmergencyEnterMenuView.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include <ViewBase.h> namespace views { /** * @brief A view which is displayed for a view seconds when the button is * pressed during boot. */ class EmergencyEnterMenuView : public lcd::ViewBase { public: /** * @brief Construct a v...
hugo3132/EmlaLockSafe
software/src/RealTimeClock.h
<reponame>hugo3132/EmlaLockSafe /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include <ds3231.h> #include <stdlib.h> #include <sys/time.h> /** * @brief Helper syncinc the SystemClock with the RTC running in UTC. */ class RealTimeClock { public: /** * @brief Sets the system clo...
hugo3132/EmlaLockSafe
software/src/configuration/WifiConfigurationServer.h
<filename>software/src/configuration/WifiConfigurationServer.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "Configuration.h" #include "ConfigurationServerBase.h" #include <Arduino.h> #include <DNSServer.h> #include <Esp.h> #include <LiquidCrystal_PCF8574.h> #include <WiFi.h...
hugo3132/EmlaLockSafe
software/src/LockState.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "Tools.h" #include "UsedInterrupts.h" #include <SPIFFS.h> #include <mutex> #include <time.h> /** * @brief Singleton class managing the current lock state. The class also * automatically saves the lock state to flash so we know ...
hugo3132/EmlaLockSafe
software/src/configuration/ConfigurationServerBase.h
<filename>software/src/configuration/ConfigurationServerBase.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../UsedInterrupts.h" #include <ESPAsyncWebServer.h> #include <SPIFFS.h> namespace configuration { /** * @brief Base class for configuring the controller over WiFi ...
hugo3132/EmlaLockSafe
software/src/views/ConfigurationServerView.h
<reponame>hugo3132/EmlaLockSafe<filename>software/src/views/ConfigurationServerView.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include <MenuView.h> namespace views { /** * @brief preferences menu */ class ConfigurationServerView : public lcd::MenuView { p...
hugo3132/EmlaLockSafe
software/src/views/HardwareTestView.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include <RotaryEncoder.h> #include <ViewBase.h> #include <ds3231.h> namespace views { /** * @brief Main view testing all connected hardware */ class HardwareTestView : public lcd::ViewBase { protected: /** * ...
hugo3132/EmlaLockSafe
software/src/views/EmergencyEnterKeyView.h
<filename>software/src/views/EmergencyEnterKeyView.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../LockState.h" #include "../configuration/Configuration.h" #include "ViewStore.h" #include <RotaryEncoder.h> #include <ViewBase.h> namespace views { /** * @brief View which ...
hugo3132/EmlaLockSafe
software/src/configuration/ConfigurationServer.h
<reponame>hugo3132/EmlaLockSafe /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../UsedInterrupts.h" #include "../views/ViewStore.h" #include "ConfigurationServerBase.h" #include <Arduino.h> #include <ESPAsyncWebServer.h> #include <LiquidCrystal_PCF8574.h> #include <RotaryEnco...
hugo3132/EmlaLockSafe
software/src/views/EmergencyMenu.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "ViewStore.h" #include <MenuView.h> namespace views { /** * @brief Emergency menu */ class EmergencyMenu : public lcd::MenuView { public: /** * @brief Construct a new main menu object * * @param display pointer to th...
hugo3132/EmlaLockSafe
software/src/configuration/HardwareConfiguration.h
<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once /** * @brief GPIO the coil of the safe is connected to */ #define COIL_PIN 15 /** * @brief Value of the COIL_PIN if the coil should be locked */ #define SAFE_COIL_LOCKED LOW /** * @brief Value of the COIL_PIN if the co...
hugo3132/EmlaLockSafe
software/src/views/PreferencesMenu.h
<filename>software/src/views/PreferencesMenu.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include "../UsedInterrupts.h" #include "../configuration/Configuration.h" #include <DialogYesNo.h> #include <ESP.h> #include <MenuView.h> #include <SPIFFS.h> namespace v...
hugo3132/EmlaLockSafe
software/src/views/UpdateCertificatesView.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../configuration/HardwareConfiguration.h" #include <ESP8266WiFi.h> #include <LittleFS.h> #include <ViewBase.h> namespace views { /** * @brief View displayed while updating the certificates */ class UpdateCertificatesView : pub...
hugo3132/EmlaLockSafe
software/src/views/UnlockSafeView.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../LockState.h" #include "../Tools.h" #include "../configuration/Configuration.h" #include "ViewStore.h" #include <DialogOK.h> #include <MenuView.h> #include <RotaryEncoder.h> #include <ViewBase.h> #include <time.h> namespace vi...
hugo3132/EmlaLockSafe
software/src/views/TimeRestrictedView.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../configuration/Configuration.h" #include <ViewBase.h> namespace views { /** * @brief View used when the safe should be opened but the time is not within the allowed range */ class TimeRestrictedView : public lcd::ViewBase { ...
hugo3132/EmlaLockSafe
software/src/views/HygieneOpeningMenu.h
<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../LockState.h" #include "ViewStore.h" #include <MenuView.h> namespace views { /** * @brief View used when the safe is unlocked for a hygiene opening */ class HygieneOpeningMenu : public lcd::MenuView { public: ...
hugo3132/EmlaLockSafe
software/src/views/SetTimerView.h
<reponame>hugo3132/EmlaLockSafe /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "LockState.h" #include "ViewStore.h" #include <DialogYesNoBack.h> #include <MenuView.h> #include <RotaryEncoder.h> #include <ViewBase.h> namespace views { /** * @brief View used to set a manual ti...
hugo3132/EmlaLockSafe
software/src/views/EmlalockUnlockKeyMenu.h
<filename>software/src/views/EmlalockUnlockKeyMenu.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../configuration/Configuration.h" #include <DialogYesNo.h> #include <MenuView.h> namespace views { /** * @brief Menu for showing / changing the unlock key */ class EmlalockUn...
hugo3132/EmlaLockSafe
software/src/views/WifiConnectingView.h
<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include "../configuration/Configuration.h" #include <MenuView.h> #include <ViewBase.h> #include <WiFi.h> #include <time.h> namespace views { /** * @brief View displayed while connection to the access...
hugo3132/EmlaLockSafe
software/src/configuration/Configuration.h
<reponame>hugo3132/EmlaLockSafe /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "..\UsedInterrupts.h" #include <Arduino.h> #include <SPIFFS.h> #include <ViewBase.h> #include <algorithm> #include <stdlib.h> #include <time.h> namespace configuration { /** * @brief Static class ...
hugo3132/EmlaLockSafe
software/src/views/ViewStore.h
/** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include <ViewBase.h> #include <map> namespace views { /** * @brief Class managing which holds static references to all views which can be * accessed over the ViewId without including any views. This ensures that no * include loops are n...
hugo3132/EmlaLockSafe
software/src/Tools.h
<filename>software/src/Tools.h /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "configuration/HardwareConfiguration.h" #include <ViewBase.h> #include <WiFi.h> /** * @brief class providing some static functions */ class Tools { public: /** * @brief tick routine updating ...
hugo3132/EmlaLockSafe
software/src/UsedInterrupts.h
<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "configuration/HardwareConfiguration.h" #include <Arduino.h> #include <functional> void ICACHE_RAM_ATTR encoderInterrupt(void); /** * @brief Class used to globally disable enable interrupts. * * The interrupts ...
hugo3132/EmlaLockSafe
software/src/views/LockedView.h
<gh_stars>1-10 /** * @author Hugo3132 * @copyright 2-clause BSD license */ #pragma once #include "../Tools.h" #include "../emlalock/EmlaLockApi.h" #include <RotaryEncoder.h> #include <ViewBase.h> namespace views { /** * @brief View used when the safe is locked. */ class LockedView : public lcd::ViewBase { pr...
dra27/ocaml-jit
lib/jit_stubs.c
/* Copyright (c) 2021 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM...
DieracDelta/cbat_tools
wp/resources/sample_binaries/nested_ifs/main.c
<gh_stars>0 #include <assert.h> #include <stdlib.h> #define STRING_MAX 10 void gotoExample() { char *string1, *string2, *string3, *string4, *string5; if ( !(string1 = (char*) calloc(STRING_MAX, sizeof(char))) ) goto gotoExample_string1; if ( !(string2 = (char*) calloc(STRING_MAX, sizeof(char))) )...
DieracDelta/cbat_tools
wp/resources/sample_binaries/equiv_null_check/main_2.c
<reponame>DieracDelta/cbat_tools<gh_stars>0 #include<stdlib.h> #include<assert.h> int main(void) { char * p = malloc(10); if( p == NULL ) assert(0); * (p + 3) = 0; return * (p + 3); }
krevony/wordcount
wordcount.c
#include <stdio.h> int main(int argc, const char * srgv[]) { char c = '\0'; char firstletter; int wordnum; int word_in; while(1) { wordnum = 0; word_in = 1; firstletter = '\0'; printf("문자열을 입력하세요: "); while(1) { c = getchar(); if(c == '\n') { if(word_in) wordnum++; break; } f...
pedromig/COMP-Project
tests/meta3/input/duplicateParamNames.c
double f1(short a, double b, int b); double f2(short a, double b, int b); double f2(short a, double b, int b){} double f3(short a, double b, int b){} double f4(short a, double b, int b){} double f3(short a, double b){}
pedromig/COMP-Project
tests/meta4/input/logical_funcs.c
<reponame>pedromig/COMP-Project char nand(char x, char y){ return !(x && y); } char nor(char x, char y){ return !(x || y); } int main(void){ putchar(nand(0, 0) + 'A'); putchar(nor(0, 0) + 'A'); return 0; }
pedromig/COMP-Project
tests/meta4/input/fibonacci.c
<filename>tests/meta4/input/fibonacci.c<gh_stars>1-10 int fibonacci(int n) { if (n <= 1) return n; return fibonacci(n - 1) + fibonacci(n - 2); } int fibonacci_seq(int n) { int n1 = 0, n2 = 1, n3 = 0; int i = 2; while (i < n) { n3 = n1 + n2; putchar(' '); putchar(n3);...
pedromig/COMP-Project
tests/meta3/input/globalVarTest.c
int a = 2; int a(int v1); int main(void){ a=3; } int f1(void){ a=3; int a; a=4; }
pedromig/COMP-Project
src/structures.h
<gh_stars>1-10 /** * Licenciatura em Engenharia Informática | Faculdade de Ciências e Tecnologia da Universidade de Coimbra * Projeto de Compiladores 2020/2021 * * 2018288117 <NAME> * 2018283166 <NAME> * */ #ifndef __STRUCTURES_H #define __STRUCTURES_H #include <stdbool.h> typedef const char *type_t; typed...
pedromig/COMP-Project
tests/meta3/input/mooshak1.c
int a, A1, A5, A4; char blah(int r); char c1; char localvars( int A0, char A1, short A2, double A3, int A4, char C0) { char c0, c1, c2, c3, c4; int a0, a1, a2, a3, a4; double b1, b2, b3, b4; int blah, localvars; } char C1, C2, C3, C4; char localvars( int A0, char A1, ...
pedromig/COMP-Project
tests/meta4/input/nested_whiles.c
<gh_stars>1-10 void print_number(int n) { int u = 1; while (n / u) u = u * 10; while (u > 1) { putchar('0' + n / (u / 10) - n / u * 10); u = u / 10; } } int sum_range_inverse(int min, int max) { int sum = 0; int i = max; while (i >= min) { while (i >= min) { ...
pedromig/COMP-Project
tests/meta3/input/alreadyDefinedTest.c
double f1(double a){} int f1(int a, int p){} int f1(void, void){}
pedromig/COMP-Project
tests/meta4/input/hello.c
int main(void) { char a = 'H'; char b = 'e'; putchar(a); putchar(b); putchar('l'); putchar('l'); putchar('o'); char c = ' '; char d = 'W'; putchar(c); putchar(d); char e = 'o'; putchar(e); putchar('r'); putchar('l'); putchar('d'); char f = '\n'; pu...
pedromig/COMP-Project
tests/meta4/input/returns.c
char aa(char a) { return a; } short bb(short b) { return b; } int cc(int c) { return c; } double dd(double d) { return d; } int ee(char a) { return aa(a); } int ff(short a) { return bb(a); } char gg(int a) { return cc(a); } short hh(char a) { return aa(a); } double ii(double x) { return dd(x);...
pedromig/COMP-Project
tests/meta3/input/duplicateParamWithVoid.c
<reponame>pedromig/COMP-Project<filename>tests/meta3/input/duplicateParamWithVoid.c int func1(short a, double b, void b); int func2(short a, void b, void b); double f7(short a, double b, int b);
pedromig/COMP-Project
src/ast.c
/** * Licenciatura em Engenharia Informática | Faculdade de Ciências e Tecnologia da Universidade de Coimbra * Projeto de Compiladores 2020/2021 * * 2018288117 <NAME> * 2018283166 <NAME> * */ #include "ast.h" #include "y.tab.h" extern bool syntax_error; int alloc_types[] = { ID, INTLIT, REALLIT,...
pedromig/COMP-Project
tests/meta4/input/factorials.c
int factorial(int number) { int answer = 1; while (number != 0) { answer = answer * number; number = number - 1; } return answer; } int recursive_factorial(int number) { if (number == 0) { return 1; } return number * recursive_factorial(number - 1); } int tail_recur...
pedromig/COMP-Project
tests/meta4/input/functions.c
<reponame>pedromig/COMP-Project int getint(void) { int read = 0, sign = 1; char c = '4'; if (c == '-') sign = -1; while (c != '\n') { if (c != '-') read = read * 10 + c - '0'; c = '\n'; } return sign * read; } void putint(int n) { if (n < 0) { put...
pedromig/COMP-Project
tests/meta4/input/simple_if.c
int main(void) { int a = 1; if(1); if (a) { putchar('a'); } if (1) { if (0) { putchar('a'); } else { if (2 < 0) { putchar('b'); } putchar('b'); } } if (1 + 2) { putchar('a'); } ...
pedromig/COMP-Project
tests/meta4/input/primes.c
<reponame>pedromig/COMP-Project<gh_stars>1-10 void primes(int low, int high) { int i, flag, stop; while (low < high) { flag = 0; if (low <= 1) { low = low + 1; } else { i = 2; stop = 0; while (i <= low / 2 && !stop) { if ...
pedromig/COMP-Project
tests/meta4/input/essential.c
<filename>tests/meta4/input/essential.c char global_char = '\000'; char global_char1 = '\1'; char global_char2 = '\4'; char global_char3 = '\44'; char global_char4 = '\24'; char global_a = 'A'; short global_b = 'B'; int global_c = 'C'; double global_d = 4.0; int main(void) { // Printing, variable declaration, ass...
pedromig/COMP-Project
src/utils.c
#include "utils.h" #define MAX(A, B) (A > B) ? (A) : (B) // Low(char) -> High(double) static const char *types[] = { "char", "short", "int", "double", }; // Arithmetic Operators static const char *arithmetic[] = { "Add", "Sub", "Mul", "Div", "Mod", }; // Unary Operators static co...