source: branches/v2.9/mediafolder/c/cddb/printhelper.cpp

Last change on this file was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

File size: 1.6 KB
Line 
1/*
2 * This file is (C) Chris Wohlgemuth 1999/2000
3 */
4/*
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; see the file COPYING. If not, write to
17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20#include <os2.h>
21#include <stdio.h> /* For stderr */
22#include <string.h>
23#include <io.h>
24#include <fcntl.h>
25#include <sys/types.h>
26#include <sys/stat.h>
27
28/**********************************************************/
29/* Some helper functions
30 */
31
32void extern printError(char* errorString)
33{
34 fprintf(stderr,"%s",errorString);
35}
36
37void extern printErrorCR(char* errorString)
38{
39 fprintf(stderr,"%s\n",errorString);
40}
41
42
43void extern printData(char* outString)
44{
45 int fileHandle;
46 int rc;
47
48 fileHandle=open("cddb.out",O_APPEND|O_TEXT|O_WRONLY|O_CREAT,S_IWRITE);
49 if(fileHandle==-1) {
50 printError("Cannot open cddb.out");
51 return;
52 }
53 rc= write(fileHandle,outString,strlen(outString));
54 // write(fileHandle,"\n",sizeof("\n"));
55 close(fileHandle);
56 return;
57}
58
59
60
61
62
63
64
65
66
67
68
Note: See TracBrowser for help on using the repository browser.