text
stringlengths
3.08k
10.5k
#include <argp.h> #include "disk.h" #define TEMP_ARG 't' #define NEWFILE_ARG 'n' #define CLEAN_ARG 'c' #define FREE_FILE_POINTER_ARG 'f' #define WSIZE_ARG 222 #define MAX_WSIZE_ARG 333 #define SLEEP_ARG 444 #define MIN_SLEEP 0 #define DEFAULT_SLEEP 1 #define MIN_WSIZE_MB 1 #define MIN_MAX_WSIZE_MB 1 #define DEFAUL...
#include"src/include/system.h" #include"src/include/pingpong.h" extern db_server DBServer; int db_pingpong_init(void *pp_info, size_t db_size) { db_pingpong_infomation *info; info = pp_info; info->db_size = db_size; if (NULL == (info->db_pp_as = malloc(DBServer.rowSize * db_size))) { perror("...
// SPDX-License-Identifier: GPL-2.0+ /* * Renesas RCar Gen3 memory map tables * * Copyright (C) 2017 <NAME> <<EMAIL>> */ #include <common.h> #include <cpu_func.h> #include <asm/armv8/mmu.h> #include <asm/global_data.h> #define GEN3_NR_REGIONS 16 static struct mm_region gen3_mem_map[GEN3_NR_REGIONS] = { { .vir...
/*copyright (c) 2018, <NAME> (<EMAIL>) 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 f...
#include <string.h> #include <regex.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #define INCLUDE_TOKENISER_H_MACROS #include "tokeniser.h" //An associative array of token names. const char *TOKEN_NAMES[] = { TOKENS(TOKEN_NAME_STR_COMMA) }; //An associative array of token regexes. const char...
/*************************************************************************/ /* */ /* Language Technologies Institute */ /* Carnegie Mellon University */ /* ...
/* * xfrm4_output.c - Common IPsec encapsulation code for IPv4. * Copyright (c) 2004 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License,...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include <arpa/inet.h> #include <string.h> #define TRUE 1 #define FALSE 0 #define MAX_BUFFER_SIZE 2048 #define INDIR_SERVER_ADDR "192.168.3.11" #define INDIR_SERVER_PORT 9043 /** * Check whethe...
/* * Copyright (c) 2011-2013, <NAME> * 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 a...
/* * Lab5.c * * Created: 4/9/2021 12:09:14 PM * Author : <NAME> * source used: https://embedds.com/programming-avr-usart-with-avr-gcc-part-1/ * https://www.learncpp.com/cpp-tutorial/passing-arguments-by-address/ * https://maker.pro/custom/tutorial/how-to-take-analog-readings-with-an-avr-microcontroller * https:...
/* * * Copyright (c) 1996 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice immediately at...
#include "event_loop.h" #include <sys/socket.h> #include <sys/time.h> #include <unistd.h> #include <string.h> static struct socket_data *wait_context; static struct socket_data *wait_context_no_timeout; static s32 max_fd = 0; static s8 gexit = 0; s32 time_before(struct time_value *a, struct time_value *b) { if (a->se...
/** * @file mu_stream.c * * MIT License * * Copyright (c) 2022 <NAME> * * 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 ...
// Copyright (C) 2021 <NAME> <<EMAIL>> // This work is free. You can redistribute it and/or modify it under the // terms of the Do What The Fuck You Want To Public License, Version 2, // as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. #include <windows.h> #include <stdio.h> #include <...
/* * dict.c - dictionary (hash table) implementation * * Copyright 2010 <NAME> <<EMAIL>>. All rights reserved. * This code is available under the simplified BSD license. See LICENSE for details. */ #include "8cc.h" #define DELETED ((void *)-1) #define BUCKET_EMPTY(ent) ((ent)->key == NULL || (ent)->key == DELE...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <syslog.h> #include <unistd.h> #include <signal.h> #include <sys/socket.h> #include <netinet/in.h> #include <netpacket/packet.h> #include <net/ethernet.h> #include "lldp.h" #include "ether_utils.h" #include "tlv_writer.h" #define PID_FILE_PATH ...
/* * Copyright 1996-2018 Cyberbotics Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
/* Copyright (c) 2003-, <NAME> All rights reserved. License : MIT */ #include <stdio.h> #include <sys/types.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <assert.h> #include "thp.h" /* Local types */ // jobs entry struct _thp_job_t { thp_fun fun; // pointer to function thr...
/* # clove # # Copyright (C) 2017-2020 <NAME> # # This project is free software; you can redistribute it and/or modify it # under the terms of the MIT license. See LICENSE.md for details. */ #include <stdlib.h> #include <string.h> #include <math.h> #include "../include/bitmap_font.h" #include "../include/shad...
/** * \file usb_msc_structs.c * * \brief This file contains the data structures defining the * USB mass storage device. */ /** * \copyright Copyright (C) 2013 Texas Instruments Incorporated - * http://www.ti.com/ */ /** * Redistribution and use in source and binary forms, with or wit...
#include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <x86intrin.h> #define FIRST_CHAR 32 #define CHARACTER_COUNT (127-32) #define MEASURES_PER_ITEM 10000 extern void init_password(); extern int check_password(char* provided, int length); extern void print_pwd(); int partition(unsigned long* arr, int ...
/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * ...
/* * copyright (c) 2006 <NAME> <<EMAIL>> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any ...
/* * @brief PWM timer driver * * @note * Copyright (C) Elektor, 2014 * All rights reserved. * * @par * This software is supplied "AS IS" without any warranties of any kind, * and Elektor and its licensor disclaim any and all warranties, express * or implied, including all implied warranties of merchantability...
/* * Copyright (c) 2018 Liming,Deng <<EMAIL>> * Author: <NAME> * * 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, ...
/* This function initialise the MMU with the following mapping */ /* Physical 0x00000000 - 0x20000000, virtual 0x00000000 - 0x20000000, RWX user, RWX super, write-back, no write allocate */ /* RPI1 Physical 0x20000000 - 0x21000000, virtual 0x20000000 - 0x21000000, RWX user, RWX super, write-back, no-cach...
/* TODO * Implement: * - Clean up the code (some things may still have their first, inefficient implementation, but remain as they always have simply because they work) * - Also, use Code Inspector or CMake to check for security/standards violations * - Finish internal commentary * - Randomize (or allow selection) of ...
// ext/stolen_sleigh/optimiser_splicer.c #include "optimiser_splicer.h" // Implements an optimiser based on splitting trips up. This is incomplete. inline double optimiser_splicer__probability( double delta, double inv_t ) { return exp( -delta * inv_t ); } inline double optimiser_splicer__multi_trip_cost( int num...
#include <time.h> #include <string.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_system.h" #include "esp_log.h" #include "driver/uart.h" #include "driver/gpio.h" #include "led.h" #include "tashtalk.h" #include "node_table.h" #include "packet_types.h" #include "packet_utils.h" #include "hw...
/*------------------------------------------------------------------------- * * Identification: * backup_utils.c * * Copyright: * Copyright (c) 2017-2020, HighGo Software Co.,Ltd. All right reserved * * Authored by <EMAIL> ,20180821 * * Abstract: * 此代码用于读取备份集数据 * *-------------------------------------...
#include "utf8.h" #include <stdio.h> #include <stdlib.h> #define SINGLE_MAX 127 #define DOUBLE_MAX 2047 #define TRIPLE_MAX 65535 #define QUAD_MAX 1114111 #define SIX_FREE_BITS 63 #define FIVE_FREE_BITS 31 #define FOUR_FREE_BITS 15 #define THREE_FREE_BITS 7 #define ONE_BYTE_FLAG(n) !((n >> 7) & 1) #define NEXT_BYTE_F...
#include <err.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include "common.h" #include "pfasta.h" static size_t line_length = 70; void usage(int exit_code); void process(const char *file_name); struct s...
/* * Copyright (c) 2012 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "native_client/src/include/portability_string.h" #include "native_client/src/include/nacl_macros.h" #include "native_client/src/i...