Changeset 9965b2b in git


Ignore:
Timestamp:
26/07/10 11:23:57 (9 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.1.14, svn/tags/1.1.15, svn/tags/1.1.16, svn/tags/1.2.0, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
175cac6
Parents:
9e12d78
Message:

src/: Strip out "Far" and "Huge" which we no longer need now that
DOS memory models are no longer relevant.

git-svn-id: file:///home/survex-svn/survex/trunk@3503 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r9e12d78 r9965b2b  
     1Mon Jul 26 10:23:07 GMT 2010  Olly Betts <olly@survex.com>
     2
     3        * src/: Strip out "Far" and "Huge" which we no longer need now that
     4          DOS memory models are no longer relevant.
     5
    16Mon Jul 26 09:57:37 GMT 2010  Olly Betts <olly@survex.com>
    27
  • src/filename.c

    r9e12d78 r9965b2b  
    11/* OS dependent filename manipulation routines
    2  * Copyright (c) Olly Betts 1998-2003,2004,2005
     2 * Copyright (c) Olly Betts 1998-2003,2004,2005,2010
    33 *
    44 * This program is free software; you can redistribute it and/or modify
     
    102102}
    103103
    104 extern char * Far
     104extern char *
    105105path_from_fnm(const char *fnm)
    106106{
     
    175175}
    176176
    177 extern char * Far
     177extern char *
    178178leaf_from_fnm(const char *fnm)
    179179{
     
    193193
    194194/* Make fnm from pth and lf, inserting an FNM_SEP_LEV if appropriate */
    195 extern char * Far
     195extern char *
    196196use_path(const char *pth, const char *lf)
    197197{
     
    229229
    230230/* Add ext to fnm, inserting an FNM_SEP_EXT if appropriate */
    231 extern char * Far
     231extern char *
    232232add_ext(const char *fnm, const char *ext)
    233233{
     
    260260 * or NULL if file didn't open
    261261 */
    262 extern FILE Far *
     262extern FILE *
    263263fopenWithPthAndExt(const char *pth, const char *fnm, const char *ext,
    264264                   const char *mode, char **fnmUsed)
  • src/filename.h

    r9e12d78 r9965b2b  
    11/* filename.h
    22 * Function prototypes for filename.c
    3  * Copyright (C) 1998-2003 Olly Betts
     3 * Copyright (C) 1998-2003,2010 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    2828#include "osdepend.h"
    2929
    30 char * Far path_from_fnm(const char *fnm);
    31 char * Far base_from_fnm(const char *fnm);
    32 char * Far baseleaf_from_fnm(const char *fnm);
    33 char * Far leaf_from_fnm(const char *fnm);
    34 char * Far use_path(const char *pth, const char *lf);
    35 char * Far add_ext(const char *fnm, const char *ext);
     30char * path_from_fnm(const char *fnm);
     31char * base_from_fnm(const char *fnm);
     32char * baseleaf_from_fnm(const char *fnm);
     33char * leaf_from_fnm(const char *fnm);
     34char * use_path(const char *pth, const char *lf);
     35char * add_ext(const char *fnm, const char *ext);
    3636
    3737FILE *fopenWithPthAndExt(const char *pth, const char *fnm, const char *ext,
  • src/matrix.c

    r9e12d78 r9965b2b  
    11/* matrix.c
    22 * Matrix building and solving routines
    3  * Copyright (C) 1993-2003 Olly Betts
     3 * Copyright (C) 1993-2003,2010 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    4646
    4747#if PRINT_MATRICES
    48 static void print_matrix(real Far *M, real *B, long n);
    49 #endif
    50 
    51 static void choleski(real Far *M, real *B, long n);
     48static void print_matrix(real *M, real *B, long n);
     49#endif
     50
     51static void choleski(real *M, real *B, long n);
    5252
    5353#ifdef SOR
    54 static void sor(real Far *M, real *B, long n);
     54static void sor(real *M, real *B, long n);
    5555#endif
    5656
    5757/* for M(row, col) col must be <= row, so Y <= X */
    58 # define M(X, Y) ((real Huge *)M)[((((OSSIZE_T)(X)) * ((X) + 1)) >> 1) + (Y)]
     58# define M(X, Y) ((real *)M)[((((OSSIZE_T)(X)) * ((X) + 1)) >> 1) + (Y)]
    5959              /* +(Y>X?0*printf("row<col (line %d)\n",__LINE__):0) */
    60 /*#define M_(X, Y) ((real Huge *)M)[((((OSSIZE_T)(Y)) * ((Y) + 1)) >> 1) + (X)]*/
     60/*#define M_(X, Y) ((real *)M)[((((OSSIZE_T)(Y)) * ((Y) + 1)) >> 1) + (X)]*/
    6161
    6262static int find_stn_in_tab(node *stn);
     
    115115build_matrix(node *list)
    116116{
    117    real Far *M;
     117   real *M;
    118118   real *B;
    119119   int dim;
     
    380380/* routine is entitled to scribble on M and B if it wishes */
    381381static void
    382 choleski(real Far *M, real *B, long n)
     382choleski(real *M, real *B, long n)
    383383{
    384384   int i, j, k;
     
    457457/* routine is entitled to scribble on M and B if it wishes */
    458458static void
    459 sor(real Far *M, real *B, long n)
     459sor(real *M, real *B, long n)
    460460{
    461461   real t, x, delta, threshold, t2;
     
    523523#if PRINT_MATRICES
    524524static void
    525 print_matrix(real Far *M, real *B, long n)
     525print_matrix(real *M, real *B, long n)
    526526{
    527527   long row, col;
  • src/message.c

    r9e12d78 r9965b2b  
    11/* message.c
    22 * Fairly general purpose message and error routines
    3  * Copyright (C) 1993-2003,2004,2005,2006,2007 Olly Betts
     3 * Copyright (C) 1993-2003,2004,2005,2006,2007,2010 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    9393 * versions easily eg for MS Windows.
    9494 */
    95 void Far *
     95void *
    9696osmalloc(OSSIZE_T size)
    9797{
    98    void Far *p;
     98   void *p;
    9999#ifdef TOMBSTONES
    100100   size += TOMBSTONE_SIZE * 2;
     
    115115
    116116/* realloc with error catching if it fails. */
    117 void Far *
     117void *
    118118osrealloc(void *p, OSSIZE_T size)
    119119{
     
    153153}
    154154
    155 char Far *
     155char *
    156156osstrdup(const char *str)
    157157{
     
    198198#endif
    199199
    200 static CDECL RETSIGTYPE Far
     200static CDECL RETSIGTYPE
    201201report_sig(int sig)
    202202{
  • src/osalloc.h

    r9e12d78 r9965b2b  
    11/* osalloc.h
    22 * Function prototypes for OS dep. malloc etc - funcs in error.c
    3  * Copyright (C) 1996,1997,2001,2003,2004 Olly Betts
     3 * Copyright (C) 1996,1997,2001,2003,2004,2010 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    3434
    3535/* OSSIZE_T is to osmalloc, etc what size_t is to malloc, etc */
    36 #ifdef HAVE_FAR_POINTERS
    37 # include "alloc.h"
    38 # define osfree(p) farfree((p))
    39 # define xosmalloc(s) farmalloc((s))
    40 # define xosrealloc(p, s) farrealloc((p), (s))
    41 # define OSSIZE_T long
     36#ifndef TOMBSTONES
     37# define osfree(p) free((p))
     38# define xosmalloc(s) malloc((s))
     39# define xosrealloc(p, s) realloc((p), (s))
    4240#else
    43 # ifndef TOMBSTONES
    44 #  define osfree(p) free((p))
    45 #  define xosmalloc(s) malloc((s))
    46 #  define xosrealloc(p, s) realloc((p), (s))
    47 # else
    4841void osfree(void *p);
    4942/* ick: */
    50 #  define xosmalloc(s) osmalloc((s))
    51 #  define xosrealloc(p, s) osrealloc((p), (s))
    52 # endif
    53 # define OSSIZE_T size_t
     43# define xosmalloc(s) osmalloc((s))
     44# define xosrealloc(p, s) osrealloc((p), (s))
    5445#endif
     46#define OSSIZE_T size_t
    5547
    5648/* NB No extra () around X as sizeof((char*)) doesn't work */
     
    5951#define osnew(T) (T*)osmalloc(ossizeof(T))
    6052
    61 void Far *osmalloc(OSSIZE_T);
    62 void Far *osrealloc(void *, OSSIZE_T);
    63 char Far *osstrdup(const char *str);
     53void *osmalloc(OSSIZE_T);
     54void *osrealloc(void *, OSSIZE_T);
     55char *osstrdup(const char *str);
    6456
    6557#ifdef __cplusplus
  • src/osdepend.h

    r9e12d78 r9965b2b  
    11/* osdepend.h
    22 * Contains commonly required OS dependent bits
    3  * Copyright (C) 1993-2003,2004,2005 Olly Betts
     3 * Copyright (C) 1993-2003,2004,2005,2010 Olly Betts
    44 *
    55 * This program is free software; you can redistribute it and/or modify
     
    5656/***************************************************************************/
    5757
    58 /* Use "Far" rather than "FAR" to avoid colliding with windows headers
    59  * which may "#define FAR far" and "#define far" or something similar.
    60  *
    61  * Use "Huge" to avoid colliding with "HUGE" which is a pre-ANSI name for
    62  * "HUGE_VAL"
    63  */
    64 # ifdef HAVE_FAR_POINTERS
    65 #  define Far far
    66 #  define Huge huge
    67 # else
    68 /* just lose these on a sensible OS */
    69 #  define Far
    70 #  define Huge
    71 # endif /* !Huge */
    72 
    7358/* defaults for things that are the same for most OS */
    7459
  • src/useful.c

    r9e12d78 r9965b2b  
    2626#ifdef WORDS_BIGENDIAN
    2727
    28 extern void Far
     28extern void
    2929useful_put16(int16_t w, FILE *fh)
    3030{
     
    3333}
    3434
    35 extern void Far
     35extern void
    3636useful_put32(int32_t w, FILE *fh)
    3737{
     
    4242}
    4343
    44 extern int16_t Far
     44extern int16_t
    4545useful_get16(FILE *fh)
    4646{
     
    5151}
    5252
    53 extern int32_t Far
     53extern int32_t
    5454useful_get32(FILE *fh)
    5555{
  • src/useful.h

    r9e12d78 r9965b2b  
    133133}
    134134#else
    135 /* FIXME: why are these "Far"? */
    136 void Far useful_put16(int16_t, FILE *);
    137 void Far useful_put32(int32_t, FILE *);
    138 int16_t Far useful_get16(FILE *);
    139 int32_t Far useful_get32(FILE *);
     135void useful_put16(int16_t, FILE *);
     136void useful_put32(int32_t, FILE *);
     137int16_t useful_get16(FILE *);
     138int32_t useful_get32(FILE *);
    140139
    141140# define put16(W, FH) useful_put16(W, FH)
Note: See TracChangeset for help on using the changeset viewer.