sh.print.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley Software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "sh.h"
void p2dig_ull(unsigned long long i);
void p2dig_int(int i);
void flush();
/*
* C Shell
*/
void
psecs_ull(unsigned long long l)
{
unsigned long long i;
i = l / 3600;
if (i) {
printf("%llu:", i);
i = l % 3600;
p2dig_ull(i / 60);
goto minsec;
}
i = l;
i %= 60;
printf(":");
p2dig_ull(i);
}
void
psecs_int(int l)
{
int i;
i = l / 3600;
if (i) {
printf("%d:", i);
i = l % 3600;
p2dig_int(i / 60);
goto minsec;
}
i = l;
i %= 60;
printf(":");
p2dig_int(i);
}
void
p2dig_ull(unsigned long long i)
{
}
void
p2dig_int(int i)
{
}
char linbuf[128];
#ifdef MBCHAR
/*
* putbyte() send a byte to SHOUT. No interpretation is done
* except an un-QUOTE'd control character, which is displayed
* as ^x.
*/
void
putbyte(int c)
{
c != '\n')) {
putbyte('^');
if (c == 0177) {
c = '?';
} else {
c |= 'A' - 1;
}
}
c &= TRIM;
*linp++ = c;
/* 'cause the next Putchar() call may overflow the buffer. */
flush();
}
}
/*
* Putchar(tc) does what putbyte(c) do for a byte c.
* Note that putbyte(c) just send the byte c (provided c is not
* a control character) as it is, while Putchar(tc) may expand the
* character tc to some byte sequnce that represents the character
* in EUC form.
*/
{
int n;
return;
}
if (n == -1) {
return;
}
linp += n;
flush();
}
}
#else /* !MBCHAR */
/*
* putbyte() send a byte to SHOUT. No interpretation is done
* except an un-QUOTE'd control character, which is displayed
* as ^x.
*/
void
putbyte(int c)
{
c != '\n')) {
putbyte('^');
if (c == 0177) {
c = '?';
} else {
c |= 'A' - 1;
}
}
c &= TRIM;
*linp++ = c;
flush();
}
}
/*
* Putchar(tc) does what putbyte(c) do for a byte c.
* For single-byte character only environment, there is no
* difference between Putchar() and putbyte() though.
*/
{
}
#endif /* !MBCHAR */
void
draino()
{
}
void
flush()
{
int unit;
int lmode;
return;
}
if (haderr) {
} else {
}
#ifdef TIOCLGET
}
#endif
}
/*
* Should not be needed.
*/
void
write_string(char *s)
{
int unit;
/*
* First let's make it sure to flush out things.
*/
flush();
if (haderr) {
} else {
}
}