summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/rmd_cache.c6
-rw-r--r--recordmydesktop/src/rmd_init_encoder.c3
-rw-r--r--recordmydesktop/src/rmd_jack.c5
-rw-r--r--recordmydesktop/src/rmd_macro.h19
4 files changed, 7 insertions, 26 deletions
diff --git a/recordmydesktop/src/rmd_cache.c b/recordmydesktop/src/rmd_cache.c
index 18e7bf3..5fe5207 100644
--- a/recordmydesktop/src/rmd_cache.c
+++ b/recordmydesktop/src/rmd_cache.c
@@ -31,7 +31,7 @@
#include "rmd_types.h"
#include "rmd_cache.h"
-#include "rmd_macro.h"
+
#include "rmd_specsfile.h"
@@ -49,7 +49,7 @@ static void CacheFileN(char *name, char **newname, int n) { // Nth cache file
char numbuf[8];
strcpy(*newname,name);
strcat(*newname,".");
- I16TOA((n),numbuf)
+ snprintf( numbuf, 8, "%d", n );
strcat(*newname,numbuf);
}
@@ -159,7 +159,7 @@ void InitCacheData(ProgData *pdata,
cache_data_t->workdir=(pdata->args).workdir;
pid=getpid();
- I16TOA(pid,pidbuf)
+ snprintf( pidbuf, 8, "%d", pid );
//names are stored relatively to current dir(i.e. no chdir)
cache_data_t->projname=malloc(strlen(cache_data_t->workdir)+
12+strlen(pidbuf)+3);
diff --git a/recordmydesktop/src/rmd_init_encoder.c b/recordmydesktop/src/rmd_init_encoder.c
index 4fb2538..c6d5576 100644
--- a/recordmydesktop/src/rmd_init_encoder.c
+++ b/recordmydesktop/src/rmd_init_encoder.c
@@ -35,7 +35,6 @@
#include "rmd_types.h"
#include "rmd_init_encoder.h"
-#include "rmd_macro.h"
static void m_add_fishead_packet(ogg_stream_state *m_ogg_state) {
@@ -73,7 +72,7 @@ static int IncrementalNaming(char **name) {
strcpy(tname,base_name__);
strcat(tname,"-");
i++;
- I16TOA((i),numbuf)
+ snprintf( numbuf, 8, "%d", i );
strcat(tname,numbuf);
strcat(tname,".ogv");
//save new name
diff --git a/recordmydesktop/src/rmd_jack.c b/recordmydesktop/src/rmd_jack.c
index 25ae297..7ace370 100644
--- a/recordmydesktop/src/rmd_jack.c
+++ b/recordmydesktop/src/rmd_jack.c
@@ -31,7 +31,6 @@
#include "rmd_types.h"
#include "rmd_jack.h"
-#include "rmd_macro.h"
#ifdef HAVE_JACK_H
@@ -147,7 +146,7 @@ static int SetupPorts(JackData *jdata) {
char name[64];//recordMyDesktop:input_n<64 is enough for full name
char num[8];
strcpy(name,"input_");
- I16TOA((i+1),num);
+ snprintf( num, 8, "%d", i+1 );
strcat(name,num);
if((jdata->ports[i]=jack_port_register_p(jdata->client,
name,
@@ -234,7 +233,7 @@ int StartJackClient(JackData *jdata){
//to connetc to a Jack Server
strcpy(rmd_client_name,"recordMyDesktop-");
pid=getpid();
- I16TOA(pid,pidbuf)
+ snprintf( pidbuf, 8, "%d", pid );
strcat(rmd_client_name,pidbuf);
if(LoadJackLib(jdata->jack_lib_handle)){
diff --git a/recordmydesktop/src/rmd_macro.h b/recordmydesktop/src/rmd_macro.h
index 93ae9e3..262c91c 100644
--- a/recordmydesktop/src/rmd_macro.h
+++ b/recordmydesktop/src/rmd_macro.h
@@ -76,22 +76,5 @@
#define Y_UNIT_WIDTH 0x0010
#define UV_UNIT_WIDTH 0x0008
-#define I16TOA(number,buffer){\
- int t_num=(number),__k=0,__i=0;\
- char *t_buf=malloc(8);\
- t_num=t_num&((2<<15)-1);\
- while(t_num>0){\
- int digit=t_num%10;\
- t_buf[__k]=digit+48;\
- t_num-=digit;\
- t_num/=10;\
- __k++;\
- }\
- while(__k>0)\
- (buffer)[__i++]=t_buf[--__k];\
- (buffer)[__i]='\0';\
- free(t_buf);\
-};\
-
-
#endif
+
© All Rights Reserved