summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshivendra32017-06-16 05:41:25 +0000
committerGitHub2017-06-16 05:41:25 +0000
commitceb262411f0fcc3f526f5ab8340da1646f25ec88 (patch)
treecb9ce5ff628b23e188785cee3b985eac25604c6f
parent4ec8089dcfdcb9eb987617b06289d8ff5a1a0d60 (diff)
downloadscilab_for_xcos_on_cloud-ceb262411f0fcc3f526f5ab8340da1646f25ec88.tar.gz
scilab_for_xcos_on_cloud-ceb262411f0fcc3f526f5ab8340da1646f25ec88.tar.bz2
scilab_for_xcos_on_cloud-ceb262411f0fcc3f526f5ab8340da1646f25ec88.zip
writeau implemented
-rwxr-xr-xmodules/scicos_blocks/src/c/writeau.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/modules/scicos_blocks/src/c/writeau.c b/modules/scicos_blocks/src/c/writeau.c
index dfda84aff..e52cb0938 100755
--- a/modules/scicos_blocks/src/c/writeau.c
+++ b/modules/scicos_blocks/src/c/writeau.c
@@ -47,6 +47,17 @@ ipar[6] = swap
ipar[7:6+lfil] = character codes for file name
*/
{
+ FILE* filePointer;
+ int processId;
+ char fileName[25];
+ char line[100];
+ filePointer = NULL;
+ processId = 0;
+ processId = getpid(); // On Linux
+ sprintf(fileName, "scilab-log-%d.txt", processId);
+ filePointer = fopen(fileName, "a");
+
+ char str[100];
FILE *fd = NULL;
int n = 0, k = 0, i = 0, ierr = 0;
double *buffer = NULL, *record = NULL;
@@ -120,10 +131,15 @@ ipar[7:6+lfil] = character codes for file name
}
else if (*flag == 4)
{
- wcfopen(fd, "/dev/audio", "wb");
+ int block_id=22;
+ fprintf(filePointer, "%d || Initialization %d\n", processId, -2);//-2 as no figure uid
+ sprintf(str, "audio%d", processId);
+ fprintf(filePointer,"%d || -2 || %s\n",block_id,str);
+ fprintf(filePointer, "%d || Ending %d\n", processId, -2);
+ wcfopen(fd, str, "wb");
if (!fd )
{
- scicos_print(_("Could not open /dev/audio!\n"));
+ scicos_print(_("Could not open file!\n"));
*flag = -3;
return;
}
@@ -149,6 +165,7 @@ ipar[7:6+lfil] = character codes for file name
fclose(fd);
z[2] = 0.0;
}
+ fclose(filePointer);
return;
}
/*--------------------------------------------------------------------------*/