![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: How To append NULL Character (Ascii 0) to Line Feed character (Ascii 10) in a file? Hello , I have a file in which There is Line Feed Character Line Feed (Ascii 10) followed by NULL Character ( Ascii 0) . NULL character if comes in next line after the LF character. Now Problem is because some requiremet I want to put NULL character ( ASCII 0) immediately after LF character. ( It should come in same line ). I write C program for this. But it is always moving to next line. Thx a lot in advance for any advise on this . Thx & Regards Nagaraj Hegde The Answer is : The OpenVMS Wizard expects this is a C programming question, as C designates the null character for special handling -- the null character is a string terminator in C. OpenVMS, RMS, and the file system -- as differentiated from C and the C run-time library -- do not particularly have special handling for the null. C can deal with null characters quite nicely, though many of the C functions -- such as str* functions -- will terminate processing of any strings when the first null is reached. Functions such as the C mem* functions, or OpenVMS RTL or various system service calls, would typically be used to process strings containing nulls. If you wish to pursue this question via Ask The Wizard, the OpenVMS Wizard will require a full C code example of the particular problem being reported, as well as the particular file organization (such as the output from DIRECTORY/FULL or otherwise) of the file involved.
|