msdosfs_conv.c (2893) | msdosfs_conv.c (3152) |
---|---|
1/* $Id$ */ | 1/* $Id: msdosfs_conv.c,v 1.1 1994/09/19 15:41:40 dfr Exp $ */ |
2/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */ 3 4/* 5 * Written by Paul Popelka (paulp@uts.amdahl.com) 6 * 7 * You can do anything you want with this software, just don't say you wrote 8 * it, and don't remove this notice. 9 * --- 8 unchanged lines hidden (view full) --- 18 */ 19 20/* 21 * System include files. 22 */ 23#include <sys/param.h> 24#include <sys/time.h> 25#include <sys/kernel.h> /* defines tz */ | 2/* $NetBSD: msdosfs_conv.c,v 1.6.2.1 1994/08/30 02:27:57 cgd Exp $ */ 3 4/* 5 * Written by Paul Popelka (paulp@uts.amdahl.com) 6 * 7 * You can do anything you want with this software, just don't say you wrote 8 * it, and don't remove this notice. 9 * --- 8 unchanged lines hidden (view full) --- 18 */ 19 20/* 21 * System include files. 22 */ 23#include <sys/param.h> 24#include <sys/time.h> 25#include <sys/kernel.h> /* defines tz */ |
26#include <sys/systm.h> /* defines tz */ |
|
26 27/* 28 * MSDOSFS include files. 29 */ 30#include <msdosfs/direntry.h> 31 32/* 33 * Days in each month in a regular year. --- 127 unchanged lines hidden (view full) --- 161 } 162 months = year & 0x03 ? regyear : leapyear; 163 /* 164 * Prevent going from 0 to 0xffffffff in the following 165 * loop. 166 */ 167 month = (dd & DD_MONTH_MASK) >> DD_MONTH_SHIFT; 168 if (month == 0) { | 27 28/* 29 * MSDOSFS include files. 30 */ 31#include <msdosfs/direntry.h> 32 33/* 34 * Days in each month in a regular year. --- 127 unchanged lines hidden (view full) --- 162 } 163 months = year & 0x03 ? regyear : leapyear; 164 /* 165 * Prevent going from 0 to 0xffffffff in the following 166 * loop. 167 */ 168 month = (dd & DD_MONTH_MASK) >> DD_MONTH_SHIFT; 169 if (month == 0) { |
169 printf("dos2unixtime(): month value out of range (%d)\n", 170 month); | 170 printf( 171 "dos2unixtime(): month value out of range (%ld)\n", 172 month); |
171 month = 1; 172 } 173 for (m = 0; m < month - 1; m++) { 174 days += months[m]; 175 } 176 days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1; 177 lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980; 178 } --- 180 unchanged lines hidden --- | 173 month = 1; 174 } 175 for (m = 0; m < month - 1; m++) { 176 days += months[m]; 177 } 178 days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1; 179 lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980; 180 } --- 180 unchanged lines hidden --- |