| 1 |
/* |
|---|
| 2 |
* Sweep, a sound wave editor. |
|---|
| 3 |
* |
|---|
| 4 |
* Copyright (C) 2000 Conrad Parker |
|---|
| 5 |
* |
|---|
| 6 |
* This program is free software; you can redistribute it and/or modify |
|---|
| 7 |
* it under the terms of the GNU General Public License as published by |
|---|
| 8 |
* the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 |
* (at your option) any later version. |
|---|
| 10 |
* |
|---|
| 11 |
* This program is distributed in the hope that it will be useful, |
|---|
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 |
* GNU General Public License for more details. |
|---|
| 15 |
* |
|---|
| 16 |
* You should have received a copy of the GNU General Public License |
|---|
| 17 |
* along with this program; if not, write to the Free Software |
|---|
| 18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|---|
| 19 |
*/ |
|---|
| 20 |
|
|---|
| 21 |
#ifndef __PRINT_H__ |
|---|
| 22 |
#define __PRINT_H__ |
|---|
| 23 |
|
|---|
| 24 |
#include <sweep/sweep_types.h> |
|---|
| 25 |
|
|---|
| 26 |
/* |
|---|
| 27 |
* Print a number of bytes to 3 significant figures |
|---|
| 28 |
* using standard abbreviations (GB, MB, kB, byte[s]) |
|---|
| 29 |
*/ |
|---|
| 30 |
int |
|---|
| 31 |
snprint_bytes (gchar * s, gint n, glong nr_bytes); |
|---|
| 32 |
|
|---|
| 33 |
/* |
|---|
| 34 |
* Print a time in the format HH:MM:SS.sss |
|---|
| 35 |
*/ |
|---|
| 36 |
int |
|---|
| 37 |
snprint_time (gchar * s, gint n, sw_time_t time); |
|---|
| 38 |
|
|---|
| 39 |
/* |
|---|
| 40 |
* Print a time in SMPTE format |
|---|
| 41 |
*/ |
|---|
| 42 |
int |
|---|
| 43 |
snprint_time_smpte (gchar * s, gint n, sw_time_t time, gint F); |
|---|
| 44 |
|
|---|
| 45 |
/* |
|---|
| 46 |
* Parse a time format string (eg. 1:30:43.34) to a double |
|---|
| 47 |
*/ |
|---|
| 48 |
double |
|---|
| 49 |
strtime_to_seconds (char * str); |
|---|
| 50 |
|
|---|
| 51 |
#endif /* __PRINT_H__ */ |
|---|