rashok

1

votes
2

answer
87

views

Will it be fine if we use msse and msse2 option of gcc in RTOS devices

As per my knowledge msse and msse2 option of gcc will improve the performance by performing arithmetic operation faster. And also I read some where like it will use more resources like registers, cache memory. What about the performance if we use the executable generated with these options on RTOS...
rashok
1

votes
1

answer
172

views

ACE_RCSID is not found in ACE 6.1

ACE_RCSID is a function which is available in ACE5.5 for some loggin purpose. This is not present in ACE 6.1, is there any other equivalent function is available in ACE 6.1 similar to this.
rashok
1

votes
1

answer
360

views

How to find an elapsed time of a C function in windows or linux

I am doing some execution in a function my_task. I want to calculate how much time (or clock cycles) taken for CPU to execute this function, because I am going to do performance improvement on this function. So I refered windows API and written the below code. typedef struct timer { LARGE_INTEGER t1...
rashok
1

votes
1

answer
7.2k

views

How to exclude some particular files in Pc-lint

While running pclint for a particular folder, its running for all the files inside that folder. If we want the pclint to omit some of the files, then how to configure it in std.lnt file?
rashok
1

votes
1

answer
112

views

Easy way to verify symbol changes in nm report

I am compiling my library(C programing) using Suse gcc compiler and then I am generating nm report of that library. I have to compare that nm report with the previous version library to check what are the symbols are present and not present in current version library. nm libxxx0.1.a > nm_0.1.txt nm...
rashok
1

votes
3

answer
746

views

How to implement wrapper function for C sscanf() without using vsscanf()

I want to implement a wrapper function for C sscanf without using vsscanf, because in my environment vsscanf() is not there only sscanf is there. I don't want to do a complete implementation of sscanf also because for that I need to consider all possible scenarios. I have seen some samples in google...
rashok
2

votes
2

answer
3.1k

views

Problem in using shell for loop inside gnu make?

consider the below make file all: @for x in y z; \ do \ for a in b c; \ do \ echo $$x$$a >> log_$$x; \ done; \ done While executing this make file, two file got created log_y and log_z. log_y is having data 'yb' and 'yc'. similarly log_z is having data'zb' and 'zc'. Actually I want to create fo...
rashok
2

votes
2

answer
1.9k

views

How to open a file having 50k lines in vi editor?

I am trying to open a log file in solaris vi editor, only 4k lines getting opened. If i open that same file using less, all lines got properly opened. If I execute the wc command on that file, # wc -l build_log 52879 build_log Please give me a solution to open that file completely in vi editor.
rashok
21

votes
3

answer
92k

views

bash shell nested for loop

I want to write a nested for loop that has to work in the bash shell prompt. nested for loop in Single line command. For example, for i in a b; do echo $i; done a b In the above example, for loop is executed in a single line command right. Like this I have tried the nested for loop in the shell pr...
rashok
4

votes
2

answer
17.7k

views

How to split a string and use it inside a for loop in ant script?

I am having a list of machine ips in a ant property. I have to copy one file to all the machines(all the machines are windows machines). So I want to split this string and to use it inside a for loop. Inside that forloop i will execute the copy command. Now how to split and use it inside for loop?
rashok
4

votes
2

answer
370

views

C typedef for undeclared structure is not throwing any compilation error

I am just wondering how typedef is not throwing any compilation error when its used with undeclared structure. Below code is compiling without any warning and error. My doubt is how come a typedef with undeclared structure is not throwing any error. Is it same in all platforms #include typedef stru...
rashok
6

votes
1

answer
4.2k

views

How to fail the ant script, if exec task fails

I am executing ant script in windows. In that consider that, i am executing dir command in exec task as below Here I have given DIRR instead of DIR, this execution will fail. but the ant build is not failing. Its showing the error message as dirr is not recognised as internal or external command and...
rashok
3

votes
1

answer
991

views

Are parallel calls to send/recv on the same socket valid as per POSIX standard?

I am trying to understand the usage of socket APIs (recv, send, select, close, etc) on parallel threads. That means using one socket file descriptor on two parallel threads. I have gone through this question. But still I am not able to find any standard doc which explains the usage of socket APIs in...
rashok
3

votes
2

answer
21.2k

views

How to get list of SSL/TLS ciphers supported by internet explorer

We are going to develop an SSL server which support all the ciphers supported by IE 10 and IE 11. So I started searching in google about the list of ciphers supported by IE, but I am not able to get a single user document which clearly mentions all SSL ciphers supported by IE. Is there any user docu...
rashok
3

votes
1

answer
3.5k

views

How do I call an Ant macro from inside another macrodef?

I have a build.xml, from here I call a macro: and my macro_file.xml file looks like this: How can I call another macro inside the ant-macro macro? I tried in the below manner, but its gives an error. The second-macro macro is also defined in the macro_file.xml file.
rashok
1

votes
2

answer
3.1k

views

removing *.o in makefile is not cleaning files

In makefile's clean i have written like rm -rf *.o. But its not cleaning files. If i have given rm -rf libdummy.o then its cleaning it properly. So if I use *, its not working as expected. clean: rm -rf *.o rm -rf dummy.a and the output is [exec] rm -rf *.o [exec] rm -rf dummy.a If the folder is ha...
rashok
1

votes
3

answer
411

views

Is there any scripting language available which is exactly similar to expect script of linux

I want to use the linux expect scripts in windows. I tried with perl expect module expect.pm in windows, its not working. Please suggest me is there any language is available in windows that is similar to expect, without using cygwin.
rashok
1

votes
1

answer
5.3k

views

How to display quote (") symbol in ant script

My ant script is, Output is xyz abc Expected Output is 'xyz abc' How to get the expected output. I tried like this 'quot;${argument}'quot;, this is also not working. Note : I am using ant 1.8.2 and antcontrib in windows 7.
rashok
4

votes
2

answer
5.4k

views

How to exclude some of the “unable to open include file *.h” errors in pclint

I am using PC lint in my project. My project is compatible to build in both windows and linux. So i have used windows header(visualstudio) files and linux header files(gcc) in my project. I am running pclint entirely for all the file. Its giving error message Unable to open include file *.h I dont...
rashok
3

votes
3

answer
60

views

How to use 2 index variable in a single for loop in python

In C language we can use two index variable in a single for loop like below. for (i = 0, j = 0; i < i_max && j < j_max; i++, j++) Can some one tell how to do this in Python ?
rashok
4

votes
2

answer
21.7k

views

What is the use of pragma code section and data section?

What exactly will happen to the data segment and text segment if I use the below two lines in my c source code file? #pragma CODE_SECTION(func1, 'Sec1') #pragma DATA_SECTION(globalvar1, 'Sec2')
rashok
3

votes
1

answer
4.9k

views

How to merge two windows vc static library into one

I am having a two static library a.lib and b.lib(of C language) which is generated using VC6 (Visual studio 6.0) . I want to merge these two libs into one static lib c.lib. How to do this in CLI mode? I have seen the merging of *nix static libs. I want to do the samething with VC6 static libs in CL...
rashok
13

votes
4

answer
34k

views

How to read data line by line from a file using ant script?

In perl we use to read data line by ilne from a file. How to do the same using ant script.
rashok
1

votes
2

answer
135

views

Best way to optimize the building/Compilation task of C library on various machines

We need to build a C library on various environment like (suse x86, suse itanium, solaris, HPUX, IBM AIX) with different compiler options(like compiler flags, 32bit or 64 bit, static or dyanamic, endianess etc). Currently we are building it on around 200 build machines. We are having an efficient ma...
rashok
3

votes
1

answer
2.2k

views

What is the equivalent command for objdump in IBM AIX

I am not able to find objdump command in IBM AIX 5.1 machine. Actually I want to get the assembly instructions (disassemble) from a library generated in AIX. Linux has objdump command and solaris dis command to do this. What is the equivalent command in IBM AIX?
rashok
42

votes
14

answer
162.8k

views

How to count no of lines in text file and store the value into a variable using batch script?

I want to count the no of lines in a text file and then the value has to be stored into a environment variable. The command to count the no of lines is findstr /R /N '^' file.txt | find /C ':' I refered the question How to store the result of a command expression in a variable using bat scripts? Th...
rashok
3

votes
2

answer
3.9k

views

what is the escape character in ant regular expression (regexp element) pattern

I am having a text file(f.txt), its content should be list of files(.c files, and other files) one by one, like below. first.c temp.c temp.txt a.txt second.c third.c In this file i want to add some prefix and suffix to only .c files. for this purpose I have written the below ant script. Its not work...
rashok
3

votes
3

answer
588

views

Check for availablity of #warning preprocessor

I am going to use #warning in my portable C code for generating compile time warnings. But #warning is not supported in all platforms. Is there any way to find whether #warning is supported in that platform. #ifdef warning //expecting similar check, not exactly this #warning ('my message') #end...
rashok
1

votes
2

answer
148

views

Jekyll - Markdown with line feed is not rendered in HTML

Jekyll 3.0.1 is not rendering a single line feed (line break). It ignores it. Surprisingly it is rending double line feed as it is. I am using Jekyll on Ubuntu 16.04. Can someone help me to tackle this behaviour ? Input Rendered
rashok
2

votes
1

answer
2.5k

views

How to use vim editor in windows source insight

I am using windows source insight. In this only the basic text editor is available. Is there any vim plugin available to use it in windwos source insight?
rashok
52

votes
8

answer
82.6k

views

Finding multiple files recursively and renaming in linux

I am having files like a_dbg.txt, b_dbg.txt ... in a Suse 10 system. I want to write a bash shell script which should rename these files by removing '_dbg' from them. Google suggested me to use rename command. So I executed the command rename _dbg.txt .txt *dbg* on the CURRENT_FOLDER My actual CURRE...
rashok
66

votes
2

answer
45.2k

views

Trying to understand gcc option -fomit-frame-pointer

I asked Google to give me the meaning of the gcc option -fomit-frame-pointer, which redirects me to the below statement. -fomit-frame-pointer Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also...
rashok
75

votes
1

answer
69.4k

views

Difference between wscript and cscript [duplicate]

This question already has an answer here: Should we use CScript.exe or WScript.exe to run .vbs files? 2 answers What is the difference between cscript and wscript? Which is best for doing Telnet and FTP automation in Windows?
rashok
8

votes
2

answer
3.7k

views

source insight is not displaying full path of a file in title bar

Consider that I have opened a file E:\code\module1\souce\temp.c in scoure insight, then in the source insight title bar it will display the path as temp.c(E:\code\..\source). But I want it to display like temp.c(E:\code\module1\source). How to achieve this
rashok
1

votes
2

answer
3.1k

views

UDP non blocking write failure

I have worked in non blocking TCP, in that both read and write can fail in non blocking case. TCP non blocking read can fail if there is no data available and TCP write can fail if peer side`s TCP buffer is full (I hope TCP buffer size is 64K). Similarly UDP read (recvfrom) can fail if no data avai...
rashok
2

votes
1

answer
96

views

Bash function local array variable is not accessible in called place

There is a 2 bash script file. First file b.sh is mentioned below. #!/bin/bash declare -a arr1=() func() { var_a=12 arr1[0]=20 arr1[1]=30 declare -a arr2=() arr2[0]=40 arr2[1]=50 } Second file a.sh is mentioned below. #!/bin/bash source b.sh func echo $var_a echo ${arr1[1]} echo ${arr2[1]} Output is...
rashok
-1

votes
1

answer
38

views

Android module build error : Plugin with id 'org.android.library' not found

In Android Studio 2.3.3, I created a project and created new module (HTTP) of type Android Library. And added a java file to that module package. While building, I am getting error like Plugin with id 'org.android.library' not found from the build.grade of that module (HTTP/build.gradle). First lin...
rashok