python_code
stringlengths
0
1.8M
repo_name
stringclasses
7 values
file_path
stringlengths
5
99
/* buffer.c * * Buffer management. * Some of the functions are internal, * and some are actually attached to user * keys. Like everyone else, they set hints * for the display system * * modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include ...
uemacs-master
buffer.c
/* display.c * * The functions in this file handle redisplay. There are two halves, the * ones that update the virtual display screen, and the ones that make the * physical display screen the same as the virtual display screen. These * functions use hints that are left in the windows by the com...
uemacs-master
display.c
/* basic.c * * The routines in this file move the cursor around on the screen. They * compute a new value for the cursor, then adjust ".". The display code * always updates the cursor location, so only moves between lines, or * functions that adjust the top line in the window and invalidate the * framing, are har...
uemacs-master
basic.c
/* FILEIO.C * * The routines in this file read and write ASCII files from the disk. All of * the knowledge about files are here. * * modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" static FILE *ffp; /* File pointer, all functions. */ sta...
uemacs-master
fileio.c
#include "util.h" /* Safe zeroing, no complaining about overlap */ void mystrscpy(char *dst, const char *src, int size) { if (!size) return; while (--size) { char c = *src++; if (!c) break; *dst++ = c; } *dst = 0; }
uemacs-master
util.c
/* exec.c * * This file is for functions dealing with execution of * commands, command lines, buffers, files and startup files. * * written 1986 by Daniel Lawrence * modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include "line.h" /* * Execute a nam...
uemacs-master
exec.c
/* posix.c * * The functions in this file negotiate with the operating system for * characters, and write characters in a barely buffered fashion on the * display. All operating systems. * * modified by Petri Kutvonen * * based on termio.c, with all the old cruft removed, and * fixed for termios...
uemacs-master
posix.c
/* TERMIO.C * * The functions in this file negotiate with the operating system for * characters, and write characters in a barely buffered fashion on the display. * All operating systems. * * modified by Petri Kutvonen */ #ifndef POSIX #include <stdio.h> #include "estruct.h" #include "edef.h" #...
uemacs-master
termio.c
/* bind.c * * This file is for functions having to do with key bindings, * descriptions, help commands and startup file. * * Written 11-feb-86 by Daniel Lawrence * Modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include "epath.h" #include "line.h" #in...
uemacs-master
bind.c
/* region.c * * The routines in this file deal with the region, that magic space * between "." and mark. Some functions are commands. Some functions are * just for internal use. * * Modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #includ...
uemacs-master
region.c
/* line.c * * The functions in this file are a general set of line management utilities. * They are the only routines that touch the text. They also touch the buffer * and window structures, to make sure that the necessary updating gets done. * There are routines in this file that handle the kill buffer too. It is...
uemacs-master
line.c
/* random.c * * This file contains the command processing functions for a number of * random commands. There is no functional grouping here, for sure. * * Modified by Petri Kutvonen */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include "line.h" int tabsize; /* Tab s...
uemacs-master
random.c
#include "utf8.h" /* * utf8_to_unicode() * * Convert a UTF-8 sequence to its unicode value, and return the length of * the sequence in bytes. * * NOTE! Invalid UTF-8 will be converted to a one-byte sequence, so you can * either use it as-is (ie as Latin1) or you can check for invalid UTF-8 * by checking for a ...
uemacs-master
utf8.c
/* word.c * * The routines in this file implement commands that work word or a * paragraph at a time. There are all sorts of word mode commands. If I * do any sentence mode commands, they are likely to be put in this file. * * Modified by Petri Kutvonen */ #include <stdio.h> #include "estruct....
uemacs-master
word.c
#include "usage.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> static void report(const char* prefix, const char *err, va_list params) { char msg[4096]; vsnprintf(msg, sizeof(msg), err, params); fprintf(stderr, "%s%s\n", prefix, msg); } void die(const char* err, ...) { va_list params; va_start(p...
uemacs-master
usage.c
/* search.c * * The functions in this file implement commands that search in the forward * and backward directions. There are no special characters in the search * strings. Probably should have a regular expression search, or something * like that. * * Aug. 1986 John M. Gamble: * Made forward and reverse sear...
uemacs-master
search.c
#include "usage.h" #include <stdlib.h> /* Function copyright: git */ int xmkstemp(char *template) { int fd; fd = mkstemp(template); if (fd < 0) die("Unable to create temporary file"); return fd; } void *xmalloc(size_t size) { void *ret = malloc(size); if (!ret) die("Out of memory"); return ret; }
uemacs-master
wrapper.c
/* PKLOCK.C * * locking routines as modified by Petri Kutvonen */ #include "estruct.h" #include "edef.h" #include "efunc.h" #if (FILOCK && BSD) || SVR4 #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #ifdef SVR4 #include <string.h> #else #include <strings.h> #...
uemacs-master
pklock.c
/* vt52.c * * The routines in this file * provide support for VT52 style terminals * over a serial line. The serial I/O services are * provided by routines in "termio.c". It compiles * into nothing if not a VT52 style device. The * bell on the VT52 is terrible, so the "beep" * routine is conditionalized on defi...
uemacs-master
vt52.c
/* input.c * * Various input routines * * written by Daniel Lawrence 5/9/86 * modified by Petri Kutvonen */ #include <stdio.h> #include <unistd.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include "wrapper.h" #if PKCODE #if MSDOS && TURBO #include <dir.h> #endif #endif #if PKCODE && (UNIX...
uemacs-master
input.c
/* * main.c * uEmacs/PK 4.0 * * Based on: * * MicroEMACS 3.9 * Written by Dave G. Conroy. * Substantially modified by Daniel M. Lawrence * Modified by Petri Kutvonen * * MicroEMACS 3.9 (c) Copyright 1987 by Daniel M. Lawrence * * Original statement of copying policy: * * MicroEMACS 3.9 can be copied and...
uemacs-master
main.c
/* ibmpc.c * * The routines in this file provide support for the IBM-PC and other * compatible terminals. It goes directly to the graphics RAM to do * screen output. It compiles into nothing if not an IBM-PC driver * Supported monitor cards include CGA, MONO and EGA. * * modified by Petri Kutvonen */ #define t...
uemacs-master
ibmpc.c
/* tcap.c * * Unix V7 SysV and BS4 Termcap video driver * * modified by Petri Kutvonen */ /* * Defining this to 1 breaks tcapopen() - it doesn't check if the * sceen size has changed. * -lbt */ #define USE_BROKEN_OPTIMIZATION 0 #define termdef 1 /* Don't define "term" external. */ #include <curses.h> #includ...
uemacs-master
tcap.c
/* VMSVT.C * * Advanced VMS terminal driver * * Knows about any terminal defined in SMGTERMS.TXT and TERMTABLE.TXT * located in SYS$SYSTEM. * * Author: Curtis Smith * modified by Petri Kutvonen */ #include <stdio.h> /* Standard I/O package */ #include "estruct.h" /* Emacs' structures */ #i...
uemacs-master
vmsvt.c
/* isearch.c * * The functions in this file implement commands that perform incremental * searches in the forward and backward directions. This "ISearch" command * is intended to emulate the same command from the original EMACS * implementation (ITS). Contains references to routines internal to * SEARCH.C. * ...
uemacs-master
isearch.c
#include <stdio.h> #include "version.h" void version(void) { printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION); }
uemacs-master
version.c
/* file.c * * The routines in this file handle the reading, writing * and lookup of disk files. All of details about the * reading and writing of the disk are in "fileio.c". * * modified by Petri Kutvonen */ #include <stdio.h> #include <unistd.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #incl...
uemacs-master
file.c
/* LOCK.C * * File locking command routines * * written by Daniel Lawrence */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #if BSD | SVR4 #include <sys/errno.h> static char *lname[NLOCKS]; /* names of all locked files */ static int numlocks; /* # of current locks active */ /*...
uemacs-master
lock.c
/* ANSI.C * * The routines in this file provide support for ANSI style terminals * over a serial line. The serial I/O services are provided by routines in * "termio.c". It compiles into nothing if not an ANSI device. * * modified by Petri Kutvonen */ #define termdef 1 /* don't define "term" external */ #inclu...
uemacs-master
ansi.c
#include "estruct.h" #include "edef.h" /* initialized global definitions */ int fillcol = 72; /* Current fill column */ int kbdm[NKBDM]; /* Macro */ char *execstr = NULL; /* pointer to string to execute */ char golabel[NPAT] = ""; /* current line to go to */ int execlevel = 0...
uemacs-master
globals.c
/* spaw.c * * Various operating system access commands. * * <odified by Petri Kutvonen */ #include <stdio.h> #include <unistd.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #if VMS #define EFN 0 /* Event flag. */ #include <ssdef.h> /* Random headers. */ #include ...
uemacs-master
spawn.c
/* window.c * * Window management. Some of the functions are internal, and some are * attached to keys that the user actually types. * */ #include <stdio.h> #include "estruct.h" #include "edef.h" #include "efunc.h" #include "line.h" #include "wrapper.h" /* * Reposition dot in the current window to li...
uemacs-master
window.c
/* * PES file parsing. * * All format credit goes to Robert Heel and * * https://bugs.launchpad.net/inkscape/+bug/247463 * * which has a php script to do so. He in turn seems to have * gotten it from NJ Crawford's C# PES viewer. I just turned * it into C. */ #include <stdio.h> #include <stdlib.h> #include <s...
pesconvert-master
pes.c
#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <errno.h> #include <string.h> #include "pes.h" static void report(const char *fmt, va_list params) { vfprintf(stderr, fmt, params); } static void die(const char *fmt, ...) { va_list params; va_start(params, fmt); report(fmt, params); va_end(pa...
pesconvert-master
main.c
#include <cairo/cairo.h> #include "pes.h" #define X(stitch) (((stitch)->x - pes->min_x) * scale) #define Y(stitch) (((stitch)->y - pes->min_y) * scale) void output_cairo(struct pes *pes, const char *filename, int size, double density) { int width = pes->max_x - pes->min_x, outw; int height = pes->max_y - pes->min...
pesconvert-master
cairo.c
#include <stdio.h> #include <stdlib.h> #include <png.h> #include "pes.h" void output_png(struct pes *pes) { int i; int width = pes->max_x - pes->min_x + 1; int height = pes->max_y - pes->min_y + 1; int outw = 128, outh = 128; png_byte **rows; struct pes_block *block; png_structp png_ptr; png_infop info_ptr; ...
pesconvert-master
png.c
#include <stdio.h> #include "pes.h" void output_svg(struct pes *pes) { printf("<?xml version=\"1.0\"?>\n"); printf("<svg xmlns=\"http://www.w3.org/2000/svg\" " "xlink=\"http://www.w3.org/1999/xlink\" " "ev=\"http://www.w3.org/2001/xml-events\" " "version=\"1.1\" " "baseProfile=\"full\" " "width=\"%d\" heig...
pesconvert-master
svg.c
// SPDX-License-Identifier: GPL-2.0 #include "trip.h" #include "dive.h" #include "subsurface-time.h" #include "subsurface-string.h" #include "selection.h" #include "table.h" #include "core/qthelper.h" struct trip_table trip_table; #ifdef DEBUG_TRIP void dump_trip_list(void) { dive_trip_t *trip; int i = 0; timesta...
subsurface-for-dirk-master
core/trip.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include "dive.h" #include "sample.h" #include "subsurface-string.h" #include "parse.h" #include "divelist.h" #include "d...
subsurface-for-dirk-master
core/import-shearwater.c
#include <unistd.h> #include <stdlib.h> #include <errno.h> #include <libdivecomputer/parser.h> #include "dive.h" #include "errorhelper.h" #include "ssrf.h" #include "subsurface-string.h" #include "divelist.h" #include "file.h" #include "parse.h" #include "sample.h" #include "divelist.h" #include "gettext.h" #include "...
subsurface-for-dirk-master
core/import-csv.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #...
subsurface-for-dirk-master
core/save-git.c
// SPDX-License-Identifier: GPL-2.0 #include <string.h> #include "ssrf.h" #include "divesite.h" #include "dive.h" #include "file.h" #include "sample.h" #include "strndup.h" // Convert bytes into an INT #define array_uint16_le(p) ((unsigned int) (p)[0] \ + ((p)[1]<<8) ) #define array_uint32_le(p) ((unsigned int...
subsurface-for-dirk-master
core/liquivision.c
// SPDX-License-Identifier: MIT /* * uemis.c * * UEMIS SDA file importer * AUTHOR: Dirk Hohndel - Copyright 2011 * * Licensed under the MIT license. */ #include <stdio.h> #include <string.h> #include "gettext.h" #include "uemis.h" #include "divesite.h" #include "sample.h" #include <libdivecomputer/parser.h> #...
subsurface-for-dirk-master
core/uemis.c
/* * libdivecomputer * * Copyright (C) 2018 Jef Driesen * * 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.1 of the License, or (at your option) any later versio...
subsurface-for-dirk-master
core/timer.c
// SPDX-License-Identifier: GPL-2.0 #include "taxonomy.h" #include "gettext.h" #include "subsurface-string.h" #include <stdlib.h> #include <stdio.h> char *taxonomy_category_names[TC_NR_CATEGORIES] = { QT_TRANSLATE_NOOP("gettextFromC", "None"), QT_TRANSLATE_NOOP("gettextFromC", "Ocean"), QT_TRANSLATE_NOOP("gettextFr...
subsurface-for-dirk-master
core/taxonomy.c
// SPDX-License-Identifier: GPL-2.0 #include "pref.h" #include "subsurface-string.h" #include "git-access.h" // for CLOUD_HOST struct preferences prefs, git_prefs; struct preferences default_prefs = { .cloud_base_url = "https://" CLOUD_HOST_EU "/", // if we don't know any better, use the European host .units = SI_UN...
subsurface-for-dirk-master
core/pref.c
// SPDX-License-Identifier: GPL-2.0 #include "gas.h" #include "pref.h" #include "gettext.h" #include <stdio.h> #include <string.h> /* Perform isobaric counterdiffusion calculations for gas changes in trimix dives. * Here we use the rule-of-fifths where, during a change involving trimix gas, the increase in nitrogen ...
subsurface-for-dirk-master
core/gas.c
#include "core/profile.h" #include "core/errorhelper.h" #include "core/file.h" #include "core/membuffer.h" #include "core/subsurface-string.h" #include "core/save-profiledata.h" #include "core/version.h" #include <errno.h> static void put_int(struct membuffer *b, int val) { put_format(b, "\"%d\", ", val); } static v...
subsurface-for-dirk-master
core/save-profiledata.c
// SPDX-License-Identifier: GPL-2.0 /* statistics.c * * core logic for the Info & Stats page - * void calculate_stats_summary(struct stats_summary *out, bool selected_only); * void calculate_stats_selected(stats_t *stats_selection); */ #include "statistics.h" #include "dive.h" #include "event.h" #include "gettext...
subsurface-for-dirk-master
core/statistics.c
// SPDX-License-Identifier: GPL-2.0 #include "ssrf.h" #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <git2.h> #include <libdivecomputer/parser.h> #include "gettext.h" #include...
subsurface-for-dirk-master
core/load-git.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat....
subsurface-for-dirk-master
core/cochran.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include <stdio.h> #include <unistd.h> #include <inttypes.h> #include <string.h> #include <sys/types.h> #include <sys/sta...
subsurface-for-dirk-master
core/libdivecomputer.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "qthelper.h" #include "ssrf.h" #include "dive.h" #include "sample.h" #include "subsurface-string.h" #include "parse.h" #include "d...
subsurface-for-dirk-master
core/import-seac.c
/* * SHA1 routine optimized to do word accesses rather than byte accesses, * and to avoid unnecessary copies into the context array. * * This was initially based on the Mozilla SHA1 implementation, although * none of the original Mozilla code remains. */ /* this is only to get definitions for memcpy(), ntohl() a...
subsurface-for-dirk-master
core/sha1.c
// SPDX-License-Identifier: GPL-2.0 /* divelist.c */ #include "divelist.h" #include "subsurface-string.h" #include "deco.h" #include "device.h" #include "divesite.h" #include "dive.h" #include "event.h" #include "filterpreset.h" #include "fulltext.h" #include "interpolate.h" #include "planner.h" #include "qthelper.h" ...
subsurface-for-dirk-master
core/divelist.c
// SPDX-License-Identifier: GPL-2.0 /* unix.c */ /* implements UNIX specific functions */ #include "ssrf.h" #include "dive.h" #include "file.h" #include "subsurface-string.h" #include "device.h" #include "libdivecomputer.h" #include "membuffer.h" #include <stdlib.h> #include <sys/types.h> #include <dirent.h> #include <...
subsurface-for-dirk-master
core/unix.c
// SPDX-License-Identifier: GPL-2.0 #include "units.h" #include "gettext.h" #include "pref.h" int get_pressure_units(int mb, const char **units) { int pressure; const char *unit; const struct units *units_p = get_units(); switch (units_p->pressure) { case BAR: default: pressure = (mb + 500) / 1000; unit = t...
subsurface-for-dirk-master
core/units.c
// SPDX-License-Identifier: GPL-2.0 #include "sample.h" /* * Adding a cylinder pressure sample field is not quite as trivial as it * perhaps should be. * * We try to keep the same sensor index for the same sensor, so that even * if the dive computer doesn't give pressure information for every sample, * we don't...
subsurface-for-dirk-master
core/sample.c
// SPDX-License-Identifier: GPL-2.0 /* gas-model.c */ /* gas compressibility model */ #include <stdio.h> #include <stdlib.h> #include "dive.h" /* "Virial minus one" - the virial cubic form without the initial 1.0 */ static double virial_m1(const double coeff[], double x) { return x*coeff[0] + x*x*coeff[1] + x*x*x*coe...
subsurface-for-dirk-master
core/gas-model.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include "dive.h" #include "divesite.h" #include "gas.h" #include "parse.h" #include "sample.h" #include "subsurface-stri...
subsurface-for-dirk-master
core/import-cobalt.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include "dive.h" #include "membuffer.h" #include "divesite...
subsurface-for-dirk-master
core/worldmap-save.c
// SPDX-License-Identifier: GPL-2.0 /* calculate deco values * based on Bühlmann ZHL-16b * based on an implemention by heinrichs weikamp for the DR5 * the original file was given to Subsurface under the GPLv2 * by Matthias Heinrichs * * The implementation below is a fairly complete rewrite since then * (C) Rober...
subsurface-for-dirk-master
core/deco.c
// SPDX-License-Identifier: GPL-2.0 #include "picture.h" #include "dive.h" #if !defined(SUBSURFACE_MOBILE) #include "metadata.h" #endif #include "subsurface-string.h" #include "table.h" #include <stdlib.h> #include <string.h> static void free_picture(struct picture picture) { free(picture.filename); picture.filename...
subsurface-for-dirk-master
core/picture.c
// SPDX-License-Identifier: GPL-2.0 #include "subsurface-time.h" #include "subsurface-string.h" #include "gettext.h" #include <string.h> #include <stdio.h> #include <stdlib.h> /* * The date handling internally works in seconds since * Jan 1, 1900. That avoids negative numbers which avoids * some silly problems. * ...
subsurface-for-dirk-master
core/time.c
// SPDX-License-Identifier: GPL-2.0 #include "subsurfacestartup.h" #include "subsurface-string.h" #include "version.h" #include "errorhelper.h" #include "gettext.h" #include "qthelper.h" #include "git-access.h" #include "pref.h" #include "libdivecomputer/version.h" #include <stdbool.h> #include <string.h> extern void...
subsurface-for-dirk-master
core/subsurfacestartup.c
// SPDX-License-Identifier: GPL-2.0 #include "event.h" #include "subsurface-string.h" #include <string.h> #include <stdlib.h> int event_is_gaschange(const struct event *ev) { return ev->type == SAMPLE_EVENT_GASCHANGE || ev->type == SAMPLE_EVENT_GASCHANGE2; } bool event_is_divemodechange(const struct event *ev) { ...
subsurface-for-dirk-master
core/event.c
// SPDX-License-Identifier: GPL-2.0 #include "divecomputer.h" #include "event.h" #include "extradata.h" #include "pref.h" #include "sample.h" #include "structured_list.h" #include "subsurface-string.h" #include <string.h> #include <stdlib.h> /* * Good fake dive profiles are hard. * * "depthtime" is the integral o...
subsurface-for-dirk-master
core/divecomputer.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include <stdlib.h> #include <stdio.h> #include <stdbool.h> #include <string.h> #include <time.h> #include "gettext.h" #include "datatrak.h...
subsurface-for-dirk-master
core/datatrak.c
// SPDX-License-Identifier: GPL-2.0 #include "tag.h" #include "structured_list.h" #include "subsurface-string.h" #include "membuffer.h" #include "gettext.h" #include <stdlib.h> struct tag_entry *g_tag_list = NULL; static const char *default_tags[] = { QT_TRANSLATE_NOOP("gettextFromC", "boat"), QT_TRANSLATE_NOOP("g...
subsurface-for-dirk-master
core/tag.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #inc...
subsurface-for-dirk-master
core/parse-xml.c
// SPDX-License-Identifier: GPL-2.0 /* profile.c */ /* creates all the necessary data for drawing the dive profile */ #include "ssrf.h" #include "gettext.h" #include <limits.h> #include <string.h> #include <assert.h> #include "dive.h" #include "divelist.h" #include "event.h" #include "interpolate.h" #include "sample....
subsurface-for-dirk-master
core/profile.c
// SPDX-License-Identifier: GPL-2.0 /* gaspressures.c * --------------- * This file contains the routines to calculate the gas pressures in the cylinders. * The functions below support the code in profile.c. * The high-level function is populate_pressure_information(), called by function * create_plot_info_n...
subsurface-for-dirk-master
core/gaspressures.c
// SPDX-License-Identifier: GPL-2.0 #include "ssrf-version.h" const char *subsurface_git_version(void) { return GIT_VERSION_STRING; } const char *subsurface_canonical_version(void) { return CANONICAL_VERSION_STRING; } #ifdef SUBSURFACE_MOBILE const char *subsurface_mobile_version(void) { return MOBILE_VERSION_STR...
subsurface-for-dirk-master
core/version.c
// SPDX-License-Identifier: LGPL-2.1+ /* * libdivecomputer * * Copyright (C) 2008 Jef Driesen * Copyright (C) 2014 Venkatesh Shukla * Copyright (C) 2015-2016 Anton Lundin * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as ...
subsurface-for-dirk-master
core/serial_ftdi.c
// SPDX-License-Identifier: GPL-2.0 /* divesite.c */ #include "divesite.h" #include "dive.h" #include "subsurface-string.h" #include "divelist.h" #include "membuffer.h" #include "table.h" #include "sha1.h" #include <math.h> struct dive_site_table dive_site_table; int get_divesite_idx(const struct dive_site *ds, stru...
subsurface-for-dirk-master
core/divesite.c
// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <stdio.h> #include <string.h> #include "errorhelper.h" #include "ssrf.h" #include "subsurface-string.h" #include "gettext.h" #include "dive.h" #include "divelist.h" #include "extradata.h" #include "file.h" #include "libdivecomputer.h" /* * Fills a devi...
subsurface-for-dirk-master
core/ostctools.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif /* equipment.c */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdarg.h> #include <time.h> #include <limits.h> #inc...
subsurface-for-dirk-master
core/equipment.c
// SPDX-License-Identifier: GPL-2.0 #include "ssrf.h" #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include "gettext.h" #include <zip.h> #include <time.h> #include "dive.h" #include "subsurface-string.h" #include "errorhelper.h" #include "file....
subsurface-for-dirk-master
core/file.c
// SPDX-License-Identifier: GPL-2.0 /* * Sane helper for 'strtod()'. * * Sad that we even need this, but the C library version has * insane locale behavior, and while the Qt "doDouble()" routines * are better in that regard, they don't have an end pointer * (having replaced it with the completely idiotic "ok" boo...
subsurface-for-dirk-master
core/strtod.c
#include "ssrf.h" #include <stdio.h> #include <assert.h> #include <stdarg.h> #include "membuffer.h" #include <stdlib.h> #include <unistd.h> #include <libdivecomputer/parser.h> #include "parse.h" #include "dive.h" #include "divesite.h" #include "errorhelper.h" #include "sample.h" #include "subsurface-string.h" #include...
subsurface-for-dirk-master
core/parse.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include "dive.h" #include "divesite.h" #include "sample.h" #include "subsurface-string.h" #include "parse.h" #include "d...
subsurface-for-dirk-master
core/import-divinglog.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <time.h> #inclu...
subsurface-for-dirk-master
core/git-access.c
// SPDX-License-Identifier: GPL-2.0 /* dive.c */ /* maintains the internal dive list structure */ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <limits.h> #include "dive.h" #include "gettext.h" #include "subsurface-string.h" #include "libdivecomputer.h" #include "device.h" #include "divelist.h" #i...
subsurface-for-dirk-master
core/dive.c
// SPDX-License-Identifier: GPL-2.0 /* planner.c * * code that allows us to plan future dives * * (c) Dirk Hohndel 2013 */ #include <assert.h> #include <unistd.h> #include <ctype.h> #include <string.h> #include "dive.h" #include "deco.h" #include "units.h" #include "divelist.h" #include "planner.h" #include "gette...
subsurface-for-dirk-master
core/plannernotes.c
// SPDX-License-Identifier: GPL-2.0 /* macos.c */ /* implements Mac OS X specific functions */ #include "ssrf.h" #include <stdlib.h> #include <dirent.h> #include <fnmatch.h> #include "dive.h" #include "subsurface-string.h" #include "device.h" #include "libdivecomputer.h" #include <CoreFoundation/CoreFoundation.h> #if !...
subsurface-for-dirk-master
core/macos.c
// SPDX-License-Identifier: GPL-2.0 /* windows.c */ /* implements Windows specific functions */ #include "ssrf.h" #include <io.h> #include "dive.h" #include "device.h" #include "libdivecomputer.h" #include "file.h" #include "errorhelper.h" #include "subsurfacesysinfo.h" #undef _WIN32_WINNT #define _WIN32_WINNT 0x500 #i...
subsurface-for-dirk-master
core/windows.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include <stdarg.h> #include "errorhelper.h" #include "membuffer.h" #include "qthelper.h" #if !defined(Q_OS_ANDROID) && !defined(__ANDROID_...
subsurface-for-dirk-master
core/errorhelper.c
// SPDX-License-Identifier: GPL-2.0 /* * uemis-downloader.c * * Copyright (c) Dirk Hohndel <dirk@hohndel.org> * released under GPL2 * * very (VERY) loosely based on the algorithms found in Java code by Fabian Gast <fgast@only640k.net> * which was released under the BSD-STYLE BEER WARE LICENSE * I believe that I...
subsurface-for-dirk-master
core/uemis-downloader.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "ssrf.h" #include "dive.h" #include "parse.h" #include "sample.h" #include "subsurface-string.h" #include "divelist.h" #include "d...
subsurface-for-dirk-master
core/import-suunto.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include "save-html.h" #include "dive.h" #include "qthelper.h" #include "gettext.h" #include "divesite.h" #include "errorhelper.h" #include...
subsurface-for-dirk-master
core/save-html.c
// SPDX-License-Identifier: GPL-2.0 #ifdef __clang__ // Clang has a bug on zero-initialization of C structs. #pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <fcntl.h> #i...
subsurface-for-dirk-master
core/save-xml.c
// SPDX-License-Identifier: GPL-2.0 /* planner.c * * code that allows us to plan future dives * * (c) Dirk Hohndel 2013 */ #include <assert.h> #include <unistd.h> #include <ctype.h> #include <string.h> #include "ssrf.h" #include "dive.h" #include "divelist.h" // for init_decompression() #include "sample.h" #includ...
subsurface-for-dirk-master
core/planner.c
// SPDX-License-Identifier: GPL-2.0 /* * An .slg file is composed of a main table (Dives), a bunch of tables directly * linked to Dives by their indices (Site, Suit, Tank, etc) and another group of * independent tables (Activity, Type, Gear, Fish ...) which connect with the dives * via a related group of tables (Ac...
subsurface-for-dirk-master
smtk-import/smartrak.c