Hi, I'm converting a C program that I made using the Visual Studio. I now use GCC (over Linux) and can't find some equivalences. I changed my __int64 definitions to unsigned long long, but can't find an equivalent to the microsoft i64toa() function, which let you convert a char* to a 64 bit... (1 Reply)
hello everybody!
I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(){
int fileDescriptor;
fileDescriptor =... (2 Replies)
I have an HP PPM (ITG) application that is running an awk command in cygwin bash shell as part of ITG process moving SAP transports on a Windows 2003 server. The awk command checks the first two characters of a file containing return code that was retrieved from the SAP server. It is throwing the... (3 Replies)
hello everybody!
i have aproblem! i dont know how to concatenate const char* with char
const char *buffer;
char *b;
sprintf(b,"result.txt");
strcat(buffer,b);
thanx in advance (4 Replies)
I am writing some code in C++ to print a message using fprintf
Here is an example
void pr_desc(
FILE* stream,
int shift,
const char* desc) {
const char* format="%*s\e;
fprintf(stream,format,shift,"",desc);
}
I call it using
const char* desc;
... (4 Replies)
Dear all,
I am using C and ROOT for programming. And I need to incorporate following in my code.
char *fps=NULL;
int dec=0,sign=0;
float mean = h1->GetMean(1); //0.001298
fps= fcvt(mean,6 , &dec, &sign);
I need to provide this mean as const char to some other function to get... (8 Replies)
Hello there,
I am new to the awk scripting and getting the following error while running the script. Please can you advise me how to resolve this . Thanks
./sub_del_awk_lat.sh
awk: cmd. line:5: warning: escape sequence `\/' treated as plain `/'
awk: cmd. line:5: sed -n... (6 Replies)
Pointers are seeming to get the best of me and I get that error in my program.
Here is the code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define REPORTHEADING1 " Employee Pay Hours Gross Tax Net\n"
#define REPORTHEADING2 " Name ... (1 Reply)
I have a problem at make step to install a downloaded package consisted of different programs.
In file included from kcdbext.cc:16:0:
kcdbext.h: In member function �char* kyotocabinet::IndexDB::get(const char*, size_t, size_t*)’:
kcdbext.h:1281:14: error: cannot convert �bool’ to... (3 Replies)
Discussion started by: yifangt
3 Replies
LEARN ABOUT DEBIAN
astribank_is_starting
ASTRIBANK_IS_STARTING(8)ASTRIBANK_IS_STARTING(8)NAME
astribank_is_starting - Mark / check is a Xorcom Astribank (xpp) is starting
SYNOPSIS
astribank_is_starting [-d] [-v] [-t timeout] <-a|-r|-w>
astribank_is_starting [-d] [-v]
astribank_is_starting -h
DESCRIPTION
astribank_is_starting is an internal tool used by various xpp scripts to mark that there may be an Astribank device currently initializing,
and to check for that mark.
Technically the mark is a SysV semaphore.
OPTIONS -a
Add. Set the mark. Should return 0 unless there's an error.
-r
Remove. Reset the mark. Should return 0 unless there's an error.
-ttimeout
Timeout. Set the timeout value for the -w option. Default is 60 seconds.
-w
Wait. Wait for mark to be reset. Should return 0 unless there's an error.
Without -a or -r: return 0 if the mark has been set, or a non-zero value otherwise.
-d
Print debug information to stderr.
-v
Verbose execution.
-h
Displays usage message.
FILES
/proc/sysvipc/sem
If set, the astribank should appear there with the ID 11211168 (0xAB11A0). Naturally the ID (or rather, the usage of a semaphore in
the first place) is an implementation detail that may change.
NOTES
astribank_is_starting is used to mark the fact that an Astribank may be currently reenumerating (technically: distonnecting and connecting
as a new USB device) after loading the firmware. Thus the script that loads the firmware (/usr/share/dahdi/xpp_fxloader) uses this utility
to set the mark.
The mark is reset by /usr/share/dahdi/waitfor_xpds , which is typically run by the DAHDI init script and waits for all Astribanks to finish
loading.
Q: Why do you use a semaphore?
A: because, unlike the filesystem, it is writable at any given time.
BUGS
Option ordering matter. The -v and -d options should preceed the actions (-a, -r and -w). The -ttimeout option should preceed the -w
option.
SEE ALSO semctl(3)AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> . Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
16 August 2009 ASTRIBANK_IS_STARTING(8)