text
stringlengths
3.08k
10.5k
#include "beam_mode_table.h" #include "asf.h" #include <assert.h> void get_all_beam_modes(const char *satellite, int *num_out, char ***names_out, double **min_looks_out, double **max_looks_out, double **look_incrs_out, char ***allowed_look_angles_...
/* * A set of tests for new hotcounting mechanism. * Copyright (C) 2020-2022 LuaVela Authors. See Copyright Notice in COPYRIGHT * Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT */ #include "test_common_lua.h" #include "uj_dispatch.h" #include "uj_hotcnt.h" static const char *chunk_all = "...
// Batch export of FFT data as images. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #include <string.h> #include <libhackrf/hackrf.h> #include <fftw3.h> #include "easypng.h" const uint32_t FFT_SIZE = 1024; const uint32_t FFT_HISTORY_SIZE = 16384; const uint32_t SAMPLES_SIZE = 131072;...
#include <stdio.h> #include <stdlib.h> /* Tictactoe : un tictactoe avec une IA */ /* La structure de donnée */ typedef struct gamestate { int** cases; int firstToPlay; int note; int ended; } gamestate; /* Un Mouvement */ typedef struct move { int x; int y; } move; /* On affiche l'état */...
/* *INDENT-OFF* */ /*INDENT OFF*/ /* Description: C source code for inverse_yday */ /****************************************************************************** * This software is covered by the zlib/libpng license. * The zlib/libpng license is a recognized open source license by * the Open Source Initiative: http:/...
/* * File : cpuport.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006 - 2011, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rt-thread.org/license/LICENSE * * Change Logs: * Date ...
/* * Copyright © 2000 SuSE, Inc. * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in...
/* lineFileSplit - Split up a line oriented file into parts. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "dystring.h" #include "options.h" #include "obscure.h" #include "portable.h" int sizeColumn = 1; void usage() /* Explain usage and exit. */ { errAbort( "lineFileSplit - Split up a li...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
/* Info on the firmware memory address: */ /* See https://lists.denx.de/pipermail/u-boot/2015-March/208201.html */ /* Details by "popcorn mix" */ /* Summary: BCM2835/6/7 is a GPU with small ARM tacked to the side. GPU uses "bus" addresses, the CPU uses "physical" addresses. VC MMU: the coarse MMU used by arm for ac...
/* Author: <NAME> <<EMAIL>> Copyright (c) 2014 Cromulence LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
#include <assert.h> #include <float.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include "evaluate.h" // seems to be good enough #define MY_EPSILON 0.0000000000000001L // #define MY_EPSILON LDBL_EPSILON // adapted from // https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2...
/* * Copyright (c) 2019, <EMAIL> * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2019-12-01 sogwms The first version */ #include "ev_cu_bcar.h" #define DBG_SECTION_NAME "ev_cu_bcar" #define DBG_LEVEL DBG_LOG #include <rtdbg.h> struct ev_cu_bca...
/* * (C) Copyright 2010 * <NAME> <<EMAIL>> * * SPDX-License-Identifier: GPL-2.0+ */ /* * mb86r0xgdc.c - Graphic interface for Fujitsu MB86R0x integrated graphic * controller. */ #include <common.h> #include <malloc.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <video_fb.h> #include "videomod...
/* $FreeBSD: releng/11.0/lib/libipsec/libpfkey.h 92941 2002-03-22 09:22:15Z obrien $ */ /* $KAME: libpfkey.h,v 1.6 2001/03/05 18:22:17 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modifi...
/* * Copyright 2004 <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, this list of conditi...
/* * Copyright (c) 2014 Netflix, 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 a...
/* libs/cutils/strdup8to16.c ** ** Copyright 2006, The Android Open Source Project ** ** 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 ...
/* * File: ps/disp/spawn.c * * It executes a thread fot the first time, calling the method spawn. * Part of the dispatcher module. * * O Spawn coloca uma nova thread pra executar efetuando * um iret. A pilha foi configurada para user mode antes de efetuar * o iret. * * History: * 2015 - Created by <NAME...
/* Time to enter the matrix. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXR 10000 #define MAXC 10000 #define MAXM 512 struct matrix { int nrows, ncols; float *data; }; struct matrix *matrices[MAXM]; #define PROMPT(fmt, ...) printf(fmt ": ", ##__VA_ARGS__) #define ERROR(fmt, ...) ...
/*---------------------------------------------------------------------- * * tableam.c * Table access method routines too big to be inline functions. * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/backend/...
/* Copyright 2011-2014 <NAME> <http://drobilla.net> 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. THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTH...
/* * Copyright 2008-2017 <NAME> * * See LICENCE for the full copyright terms. */ #include <assert.h> #include <limits.h> #include <stdio.h> #include "libfsm/internal.h" /* XXX: up here for bitmap.h */ #include <print/esc.h> #include <adt/set.h> #include <adt/bitmap.h> #include <adt/stateset.h> #include <adt/edg...
Datum vec_to_weighted_mean_numeric_transfn(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(vec_to_weighted_mean_numeric_transfn); /** * Returns an of n elements, * which each element is the weighted mean of the values found in that position * from all input arrays. The second parameter is an array of weights. * * by <NAM...
/* * peak_dispatcher.c * peak * * Created by <NAME> on 30.07.10. * Copyright 2010 <NAME> www.bjoernknafla.com. All rights reserved. * */ #include "peak_dispatcher.h" #include "peak_lib_dispatcher.h" #include <assert.h> #include <stddef.h> #include "peak_return_code.h" #include "peak_data_alignment.h" v...
/****************************************************************************** Copyright (c) 2019 <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 lim...
/* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize cop...
/* * Objectively: Ultra-lightweight object oriented framework for GNU C. * Copyright (C) 2014 <NAME> <<EMAIL>> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is ...
/* * Copyright 2016 <NAME> * * 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 wr...
#include "returnstack.h" #include "container.h" #include "functioncall.h" #include "node.h" #include "parse.h" #include "statement.h" #include "type.h" #include "util.h" #include "variable.h" #include <assert.h> typedef struct StackAllocContext StackAllocContext; struct StackAllocContext { int currentStackOffset; };...
#include "battery.h" #include "config.h" #include "string-list.h" #include "wlr-layer-shell-unstable-v1-client-protocol.h" #include <errno.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> void init_default_config(struct bat_config *config) { config->use_design_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...
/* * Copyright 2012 Red Hat Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, d...
#include "unpifi.h" struct ifi_info *get_ifi_info(int family, int doaliases){ struct ifi_info *ifi, *ifihead, **ifipnext; char *ptr, *buf, lastname[IFNAMSIZ],*cptr, *haddr,*sdlname; int sockfd, len, lastlen, flags, myflags, idx = 0, hlen = 0; struct ifconf ifc; struct ifrep *ifr, ifrcopy; struc...
/* dnet: main file; T11.231-T13.789; $DVS:time$ */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #if !defined(_WIN32) && !defined(_WIN64) #include <signal.h> #include <unistd.h> #include <sys/wait.h> #endif #include "dnet_crypt.h" #include "dnet_database....
/* * $Id: MOD_armature.c 40581 2011-09-26 18:51:10Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * 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, ...
/* ------------------------------------------------------------------------------ isaac64.c: My random number generator for 64-bit machines. By <NAME>, 1996. Public Domain. ------------------------------------------------------------------------------ */ #ifndef STANDARD #include "../include/deps/standard.h" #endif #...
/* ** testfrac.c ** ** How to make a widget to choose the fraction of tests to be run. ** */ #include <stdio.h> #include <X11/Intrinsic.h> #include <X11/StringDefs.h> #include <X11/Xaw/Form.h> #include <X11/Xaw/Label.h> #include <X11/Xaw/Scrollbar.h> #include "xgc.h" extern void interpret(); extern XtAppContext appc...
/* * Include processor definitions. */ #include "pic32mx.h" #define MHZ 80 /* CPU clock is 80 MHz. */ #define PIN(n) (1 << (n)) /* * Main entry point at bd003000. * Setup stack pointer and $gp registers, and jump to main(). */ asm (" .section .exception"); asm (" .globl _star...
/** * PS Move API - An interface for the PS Move Motion Controller * Copyright (c) 2011, 2012 <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 ...
#include <Hazel/Compiler/Lexer/Lexer.h> /* Lexer: In this phase, the source code is decomposed into its simplest "tokens". Newlines are converted to newline tokens */ // Useful Functions used by the Lexer static inline bool isNewLine(Lexer* lexer, char c) { // Carriage Return: U+000D (UTF-8 in hex...
/*---------------------------------------------------------------------------- * File: ooaofooa_TE_TFR_class.c * * Class: Extended Operation (TE_TFR) * Component: ooaofooa * * your copyright statement can go here (from te_copyright.body) *---------------------------------------------------------...
#include <string.h> #include <sys/socket.h> #include <netdb.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <time.h> #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/event_groups.h" #include "esp_log.h" #include "esp_wifi.h" #include "esp_event_loop.h" #includ...
/* camera.c - <NAME> - 2021-03-21 Example C program for Astronomy Engine: https://github.com/cosinekitty/astronomy Suppose you want to photograph the Moon, and you want to know what it will look like in the photo. Given a location on the Earth, and a date/time, this program calculates ...
/* Topology Builder <NAME> IUPUI Physics Dept. NMR Center 402 N. Blackford St. Indianapolis, IN 46202 USA Define storage for molecule from mol2 file and for the ancillary derived atom types, forcefield, and measurements data */ #define MAXNAME 128 /* information directly from .mol...
// uses tons from safety_toyota // TODO: refactor to repeat less code // IPAS override const int32_t TOYOTA_IPAS_OVERRIDE_THRESHOLD = 200; // disallow controls when user torque exceeds this value // 2m/s are added to be less restrictive const struct lookup_t LOOKUP_ANGLE_RATE_UP = { {2., 7., 17.}, {5., .8, .15}}...
/* ** ################################################################### ** Processor: LPC832M101FDH20 ** Compilers: GNU C Compiler ** IAR ANSI C/C++ Compiler for ARM ** Keil ARM C/C++ Compiler ** MCUXpresso Compiler...
/* Pause frame +---------+--------+---------+-------+--------------+---------+--------+ | dest(6) | src(6) | type(2) | op(2) | pausetime(2) | pad(42) | FCS(4) | +---------+--------+---------+-------+--------------+---------+--------+ |<----- Ethernet Payload ------> | dest: 01:80:C2:00...
/* * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Resea...
#include "../headers/spell_check.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <err.h> #define max(a, b) a < b ? b : a #define min(a, b) a < b ? a : b #define MIN3(a, b, c) min( min(a,b), c) int levenshtein(char* s1, char* s2){ int s1len, s2len, x, y, lastdiag, olddiag; s1len = strlen(...
#include <inttypes.h> #include <string.h> #include "id3v1_genres.h" static const char *id3v1_genres[] = { /* 0. */ "Blues", /* 1. */ "Classic Rock", /* 2. */ "Country", /* 3. */ "Dance", /* 4. */ "Disco", /* 5. */ "Funk", /* 6. */ "Grunge", /* 7. */ "Hip-Hop", /* 8...
/* * THEC64 Mini * Copyright (C) 2017 <NAME> * * 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 ...
//*************************************************************************************** // Get data from communication buffer. //*************************************************************************************** // // Author: <NAME> // Intel Corporation // Date: 008/30/2010 // //**********************...
/* ***************************************************************************** Esta funcao resolve as equacoes de Hamilton para o sistema usando o metodo de Runge-Kutta de 14a ordem e 35 estagios. ***************************************************************************** E-mail: <EMAIL> Site: https:...
/* Utility for listing golang symbols from the .gopclntab section of an ELF file gcc -o gosym ./test/manual/gosym.c */ #include <stdio.h> #include <string.h> #include <errno.h> #include <elf.h> #include <unistd.h> #include <stdlib.h> #include <sys/mman.h> #include <stdint.h> #include <sys/stat.h> #include <fcntl.h> #i...
/* * Checksum fixer for Withings WS-30 firmware images * (Freescale Kinetis K20 MCU) * * CRC code directly stolen from http://www.barrgroup.com/Embedded-Systems/How-To/CRC-Calculation-C-Code */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd....
#include "game.h" //define GAME_UNSET 0 //define GAME_RUNNING 1 //define GAME_OVER 2 //define NO_RESULT 0 //define O_WINS 1 //define X_WINS 2 //define TIE_GAME 3 //define STARTING_PLAYER 0 //define PLAYER_X_INDEX 0 //define PLAYER_O_INDEX 1 //define PLAYER_X_CHAR 'X' //define PLAYER_O_CHAR 'O' //define UNSET_CHECK_P...
#include <stdio.h> #include <stdbool.h> #include <stdint.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdlib.h> #include <sys/mman.h> #include <limits.h> #include <pthread.h> #include "sha3.h" // Globa...
// gcc -g player.c ksnd.c -DENABLE_WAV_WRITER -I../klystron/src ../klystron/bin.size/libksndstatic.a `sdl2-config --libs --cflags` -lm -lSDL2_mixer -lncurses // important: ajouter ceci au début de music.h (dans les sources de klystron): // #define USESDL_RWOPS 1 #include "ksnd.h" #include "snd/music.h" #include <stdi...
#include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NEWLINE "\n" void vConv(int iDbgInfo, char* szSrcDateTime, char* szSrcTZ, char* szTrgTz, int iOutputFormat) { char szEnv[64]; struct tm mytm = {0}; time_t mytime; char buf[100]; if (iDbgInfo) printf("TZ from: %s to: %s"NEWLI...
// Copyright (c) 2020 // Author: <NAME> #include "accel.h" #include <math.h> #include <string.h> #include <zephyr.h> #include <sys/printk.h> // Configuration section // TODO - make this more configurable #define SAMPLE_HZ (20) #define SAMPLE_S (0.05f) #define BASELINE_S (20) #define BASELINE_SAMPLES (SAMPLE_HZ * BASE...
/* MIT License Copyright (c) 2021 <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, copy, modify, merge, publish,...
/* * This file is part of the libpayload project. * * Copyright 2014 Google Inc. * * 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...
/* * Author: <NAME> <<EMAIL>> * * Copyright (c) 2008-2009 Plausible Labs Cooperative, 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 * restrict...
#include "definitions.h" // See Unity extern unsigned char fileNum; extern unsigned int fileSizes[]; extern unsigned char* fileNames[]; // See home.c extern unsigned char* appChunk[NUM_APPS]; extern unsigned char* icoChunk[NUM_ICOS]; // See image.c extern char imageShowing; unsigned char ...
/* $OpenBSD: fsdbutil.c,v 1.14 2009/10/27 23:59:33 deraadt Exp $ */ /* $NetBSD: fsdbutil.c,v 1.5 1996/09/28 19:30:37 christos Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME>. * * Redistri...
#include <stdio.h> #include <string.h> #include <sys/socket.h> #include <stdlib.h> #include <errno.h> #include <netinet/tcp.h> #include <netinet/ip.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/time.h> #include <signal.h> extern char *optarg; struct pseudo_header //needed for checksum calculation { ...
#include <signal.h> #include <stdlib.h> // exit, etc #include <string.h> // strcat #include <stdbool.h> #include <stdint.h> #include "nm_pcap.h" pcap_t *pkt_handler; // packet handler: accessible in a signal handler function u_int64_t cap_cnt = 0; // number of captured packets bool is_termin_cap = false; // fla...
#include <conf.h> #include <gpio.h> #include <sunsiret.h> #include <esp_log.h> #include <esp_system.h> #include <freertos/FreeRTOS.h> #include <freertos/task.h> #include <freertos/timers.h> #include <stdlib.h> #include <string.h> #define TAG "ctrl" static const char * lights_ctrl_state = "Not running"; static time_t ...
/* -*- coding: utf-8-with-signature; tab-width: 8; indent-tabs-mode: t; -*- */ /* * Suika 2 * Copyright (C) 2001-2021, <NAME>. All rights reserved. */ /* * [Changes] * - 2021/06/10 作成 */ #include "suika.h" #define INVALID_ACCEL_TYPE (0) enum cha_accel_type { CHA_ACCEL_UNIFORM, CHA_ACCEL_ACCEL, CHA_ACCEL...
/* _PDCLIB_strtod_main( const char *, char ** ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ #include <limits.h> #include <stdlib.h> #ifndef REGTEST #include <ctype.h> #include <stdio.h> #include <string.h> /* This is a wor...
#include <stdio.h> #include "esp_wifi.h" #include "esp_system.h" #include "esp_timer.h" #include "esp_event_loop.h" #include "nvs_flash.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/event_groups.h" #include "driver/uart.h" #include "cl_log.h" #define TAG "sniffer" #define MAC_HEADE...
/*************************************************** * <NAME> * * asoreyh at cab.cnea.gov.ar * ***************************************************/ #include "ran2.cpp" //Declaraciones #ifdef CUBE inline bool isInCube(vect mcar); #endif inline bool isIn(ve...
#include "stdlib.h" #include "l2_gc.h" #include "l2_storage.h" #include "../l2_drv/l2_error.h" #include "../l2_parser/l2_parse.h" extern l2_parser *g_parser_p; void l2_gc_free_gc_mem_link(l2_gc_mem_node *gc_mem_link_p) { if (gc_mem_link_p == L2_NULL_PTR) return; l2_gc_free_gc_mem_link(gc_mem_link_p->next); ...
/************************************************************************** * Copyright (C) 2015 Eff'Innov Technologies * * 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://...
/* -*- c-set-style: "K&R"; c-basic-offset: 8 -*- * * This file is part of PRoot. * * Copyright (C) 2015 STMicroelectronics * * 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 versio...
#include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <limits.h> #include <sys/statvfs.h> #include <dirent.h> #include "cpqhost.h" #include "common/utils.h" /* text associated with linux_distro_name_t */ static char *lin...
/* * Author: daddinuz * email: <EMAIL> * * Copyright (c) 2018 <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) 2005-2013 uim Project http://code.google.com/p/uim/ 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 n...
/* $OpenBSD: sunxireg.h,v 1.8 2016/02/02 21:40:47 jsg Exp $ */ /* * Copyright (c) 2013 <NAME> * * 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. * * ...
#include "util_darray.h" DArray *DArray_create(size_t element_size, size_t initial_max) { DArray *array; SERROR_SALLOC(array, sizeof(DArray)); SDEBUG("DArray_create(%p)", array); array->max = initial_max; SERROR_CHECK(array->max > 0, "You must set an initial_max > 0."); SERROR_SALLOC(array->contents, initial_ma...
/* * librdkafka - Apache Kafka C library * * Copyright (c) 2021, <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: * * 1. Redistributions of source code must retain the above copyrig...
/* NOTE: this gridloop3.c file contains errors! The purpose is to illustrate debugging. Error: wrong loop limits in gridloop2 */ #include <Python.h> /* Python as seen from C */ #include <numpy/arrayobject.h> /* NumPy as seen from C */ #include <math.h> #include <stdio.h> /* for debug...
/* * Print interface statistics in bytes per second * * Parameters: * -t # Time interval to compute, default 2 seconds * -i <ifname> Interface name, defaults to 'en0' * -s Print raw stats * * Output: Two numbers separated by a space. First value is input bytes per * second. Second value is output bytes p...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <sys/types.h> #define CLOCKSIZE 8 #define PTE_P 0x001 #define PTE_A 0x020 #define PTE_E 0x200 typedef uint32_t pte_t; typedef struct clk_node { int vpn; pte_t *pte; } node_t; // There are many ways of implementing a CLOCK eviction algorit...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <getopt.h> #include <sys/time.h> #include <inttypes.h> #include <unistd.h> #include "pdc.h" #include "pdc_client_connect.h" #define NOBJ 10 void print_usage() { printf("Should run with more than 1 processes!\n"); } int main(int argc, char...
/* * pcboard.c * libansilove 1.2.8 * https://www.ansilove.org * * Copyright (c) 2011-2021 <NAME>, <NAME>, and <NAME> * All rights reserved. * * libansilove is licensed under the BSD 2-Clause license. * See LICENSE file for details. * * SPDX-License-Identifier: BSD-2-Clause */ #include <gd.h> #include <stdi...
#include "proto.h" /* Format is the same as for plain XOR patches RLE data format: 1 byte command: bits 7-6: command (0: data, 1: repeat byte, 2: repeat halfword, 3: repeat word) bit 5: offset/long toggle (for data: 0: data, 1: repeat doubleword; for others: 0: repeat, 1: repeat and increment) bits 4...
/* * Test interface for the networking elements. * * Copyright (C) 1997-2020 <NAME>. All Rights Reserved. * See the LICENSE file accompanying the distribution your rights to use * this software. */ #include "stdconfig.h" #include "stream.h" #include "socket.h" #include "mem.h" #include <sys/types.h> #ifndef WIN...
// +build linux #include <X11/Xlib.h> #include <errno.h> #include <GL/glx.h> #include <stdio.h> #include "_cgo_export.h" Display *display; Window rootWindow; int screen; long eventMask = KeyPressMask | KeyReleaseMask | PointerMotionMask | FocusChangeMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | Leav...
/* rtc.c - implementation of real time clock device * vim:ts=4 noexpandtab */ #include "rtc.h" #include "asm_linkage.h" #include "x86_desc.h" #include "i8259.h" #include "terminal.h" /* List of usable RTC frequencies as bitmaps to Register A's lowest 4 bits Ordered as 2^(index + 1) Hz but we don't go above 102...
/* Cons Lists Copyright (c) 2016, 2017. <NAME> 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...
// // ip.c // DoritOS // // Created by <NAME> on 16/12/2017. // Copyright © 2017 <NAME>. All rights reserved. // #include "ip.h" #include "icmp.h" #include "udp.h" #include "slip.h" #include <aos/aos.h> #include <assert.h> #include <netutil/htons.h> #include <netutil/checksum.h> // IP address of this host uin...
/* USER CODE BEGIN Header */ /** * Обработчики прерываний и критических ошибок процессора. * В обработчиках ошибок процессора состояние пьезобуззера устанавливается * и не меняется, а встроенный в плату светодиод мигает определённым образом. * А в прерыванийх мы обычно выдаём семафоры. */ /* USER CODE ...
// SPDX-License-Identifier: GPL-2.0 #include "kvm_util.h" #include "processor.h" #define VCPU_ID 1 #define MMIO_GPA 0x100000000ull static void guest_code(void) { (void)READ_ONCE(*((uint64_t *)MMIO_GPA)); (void)READ_ONCE(*((uint64_t *)MMIO_GPA)); GUEST_ASSERT(0); } static void guest_pf_handler(struct ex_regs ...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <locale.h> /* ------- Função para verificar se um número é inteiro ------------ */ int verifica_int(float valor){ if (valor == (int)valor){ //(int)valor -> transforma em inteiro return 1; } else { return 0; } return 0; } ...
/* GDK - The GIMP Drawing Kit * Copyright (C) 1995-1997 <NAME>, <NAME> and <NAME> * * This library 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 of the License, or (at your op...
/* * arp.c - A simple ARP handler * * Author: <NAME> * Dept. of Computer Science * Purdue University * Date: Thu Jun 29 10:19:43 1995 */ #include <./mon/monnetwork.h> #include <./mon/monitor.h> #include <stdio.h> struct arpentry *mon_arpfind(), *mon_arpalloc(); struct arpentry mon_arptable[MON_AR...
/*<NAME> Algoritimos e Estrutura de Dados Dicionario com Skiplist ICMC-USP 2017 */ #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <string.h> #include "skiplist.h" //---------------------------------------------------------------------------------------------------------...
#include "KyberOT.h" #include<stdio.h> #include "indcpa.h" #include "polyvec.h" //to sample randomness #include "randombytes.h" #include "fips202.h" #include <string.h> unsigned char listeng[256] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',...