-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 4b668de..ec46340 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -9,36 +9,36 @@ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ************************************************************************************/ /* * $Id$ */ // Sun 03-17-2002 L.J.Potter <ljp@llornkcor.com> #include <sys/utsname.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/soundcard.h> + #include <string.h> #include <stdlib.h> #include <errno.h> -#include <string.h> typedef struct _waveheader { u_long main_chunk; /* 'RIFF' */ u_long length; /* filelen */ u_long chunk_type; /* 'WAVE' */ u_long sub_chunk; /* 'fmt ' */ u_long sc_len; /* length of sub_chunk, =16 (chunckSize) format len */ u_short format; /* should be 1 for PCM-code (formatTag) */ u_short modus; /* 1 Mono, 2 Stereo (channels) */ u_long sample_fq; /* samples per second (samplesPerSecond) */ u_long byte_p_sec; /* avg bytes per second (avgBytePerSecond) */ u_short byte_p_spl; /* samplesize; 1 or 2 bytes (blockAlign) */ u_short bit_p_spl; /* 8, 12 or 16 bit (bitsPerSample) */ @@ -280,33 +280,33 @@ void VMemo::mousePressEvent( QMouseEvent *me ) Config vmCfg("VMemo"); vmCfg.setGroup("Defaults"); QDateTime dt = QDateTime::currentDateTime(); QString fName; Config cfg( "Sound" ); cfg.setGroup( "System" ); fName = QPEApplication::documentDir() ; fileName = cfg.readEntry("RecLocation", fName); int s; s=fileName.find(':'); if(s) fileName=fileName.right(fileName.length()-s-2); qDebug("filename will be "+fileName); - if( !fileName.right(1).find('/') == -1) + if( fileName.right(1).find('/') == -1) fileName+="/"; // if(systemZaurus) // fileName=vmCfg.readEntry("Dir", "/mnt/cf/"); // zaurus does not have /mnt/ramfs // else // fileName=vmCfg.readEntry("Dir", "/mnt/ramfs/"); fName = "vm_"+ dt.toString()+ ".wav"; fileName+=fName; qDebug("filename is "+fileName); // No spaces in the filename fileName.replace(QRegExp("'"),""); fileName.replace(QRegExp(" "),"_"); fileName.replace(QRegExp(":"),"."); fileName.replace(QRegExp(","),""); |