~ubuntu-branches/ubuntu/oneiric/ghostscript/oneiric

« back to all changes in this revision

Viewing changes to base/gp_msdos.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2011-07-15 16:49:55 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20110715164955-uga6qibao6kez05c
Tags: 9.04~dfsg~20110715-0ubuntu1
* New upstream release
   - GIT snapshot from Jult, 12 2011.
* debian/patches/020110406~a54df2d.patch,
  debian/patches/020110408~0791cc8.patch,
  debian/patches/020110408~507cbee.patch,
  debian/patches/020110411~4509a49.patch,
  debian/patches/020110412~78bb9a6.patch,
  debian/patches/020110418~a05ab8a.patch,
  debian/patches/020110420~20b6c78.patch,
  debian/patches/020110420~4ddefa2.patch: Removed upstream patches.
* debian/rules: Generate ABI version number (variable "abi") correctly,
  cutting off repackaging and pre-release parts.
* debian/rules: Added ./lcms2/ directory to DEB_UPSTREAM_REPACKAGE_EXCLUDES.
* debian/copyright: Added lcms2/* to the list of excluded files.
* debian/symbols.common: Updated for new upstream source. Applied patch
  which dpkg-gensymbols generated for debian/libgs9.symbols to this file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
2
2
   All Rights Reserved.
3
 
  
 
3
 
4
4
   This software is provided AS-IS with no warranty, either express or
5
5
   implied.
6
6
 
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: gp_msdos.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id$ */
15
15
/* Common platform-specific routines for MS-DOS (any compiler) */
16
16
#include "stdio_.h"
17
17
#include "string_.h"            /* for strerror */
55
55
#define ti_sec h.dh
56
56
#define ti_hund h.dl
57
57
    idate = (long)osdate.da_year * 365 +
58
 
        (                       /* intervening leap days */
59
 
            ((osdate.da_year + 1979) / 4 - 1979 / 4) +
60
 
            (1979 / 100 - (osdate.da_year + 1979) / 100) +
61
 
            ((osdate.da_year + 1979) / 400 - 1979 / 400) +
62
 
            mstart[osdate.da_mon - 1] +         /* month is 1-origin */
63
 
            osdate.da_day - 1); /* day of month is 1-origin */
 
58
        (                       /* intervening leap days */
 
59
            ((osdate.da_year + 1979) / 4 - 1979 / 4) +
 
60
            (1979 / 100 - (osdate.da_year + 1979) / 100) +
 
61
            ((osdate.da_year + 1979) / 400 - 1979 / 400) +
 
62
            mstart[osdate.da_mon - 1] +         /* month is 1-origin */
 
63
            osdate.da_day - 1); /* day of month is 1-origin */
64
64
    idate += (2 < osdate.da_mon
65
 
              && (osdate.da_year % 4 == 0
66
 
                  && ((osdate.da_year + 1980) % 100 != 0
67
 
                      || (osdate.da_year + 1980) % 400 == 0)));
 
65
              && (osdate.da_year % 4 == 0
 
66
                  && ((osdate.da_year + 1980) % 100 != 0
 
67
                      || (osdate.da_year + 1980) % 400 == 0)));
68
68
    pdt[0] =
69
 
        ((idate * 24 + ostime.ti_hour) * 60 + ostime.ti_min) * 60 +
70
 
        ostime.ti_sec;
 
69
        ((idate * 24 + ostime.ti_hour) * 60 + ostime.ti_min) * 60 +
 
70
        ostime.ti_sec;
71
71
    pdt[1] = ostime.ti_hund * 10000000;
72
72
}
73
73
 
92
92
 
93
93
#ifdef __DLL__
94
94
    if (f == NULL)
95
 
        return 1;
 
95
        return 1;
96
96
#else
97
97
    if (f == NULL)
98
 
        return 0;
 
98
        return 0;
99
99
#endif
100
100
    regs.h.ah = 0x44;           /* ioctl */
101
101
    regs.h.al = 0;              /* get device info */