Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: BTCMan
  • Content: Threads
  • Order by date
  1. BTCMan

    Does initilizing a struct with {0} works?

    Recently I saw a code that initilizes a struct using {0} .My question is if this works for all elements of the struct or just the 1st one. Example: .H File: typedef struct { UINT32 size; UINT16 num1; UINT8 * p_buffer; } MY_RECORD; -------------- .C File: ... MY_RECORD...
  2. BTCMan

    Strlen and \0 terminator

    Hi, I would like your expertise in order to protect my code for strings without the \0 terminator (in case of memory corruption). Currently the code is failing because when it invokes strlen for a string with trash in it it never finds the \0 terminator then returns the size of the datatype...
  3. BTCMan

    Converting DOM tree into String

    Hi all, does anybody knows how to convert an org.w3c.dom.Document into a String ?? (basically I want to log the dom tree into a string object not a file). Thanks BTCMan
  4. BTCMan

    Directory Browser Dialog

    Hi, I would like suggestions on how to open a Directory only Browser Dialog (I mean: only folders are listed and one of them can be selected). I was trying to use JFileChooser with setFileSelectionMode set to DIRECTORIES_ONLY, but this was not I was looking for (I want to avoid the window to...
  5. BTCMan

    How to copy a Node into a new Document?

    Hi guys, I would like to read a node with all its contents from a DOM tree and insert it in a new DOM. Any hint? Below is my dom tree format (already in memory as a dom tree) and the expected result: MEMORY DOM: <?xml version="1.0" encoding="UTF-8"?> <Oper>...
  6. BTCMan

    How to merge n DOM trees into a new DOM tree?

    Hi people, I have a List object with "n" different DOM trees (each element of the List object has a Document object). I want to create a new DOM tree object and insert in it each one of the "n" DOM trees I have in the saved List. So the final result will be a single DOM. Any hint of code...
  7. BTCMan

    Retrieving DOM Node with wilcard

    Hi, I have the following XML: ... <aaa> <bb> <ccTemplate>../dir1/dir2/file3.xml</ccTemplate> <dd> </dd> </bb> <ee> </ee> <ff> <gg> <hhTemplate>../dir1/dir2/file4.xml</hhTemplate> </gg> </ff> </aaa> This XML file is parsed into a DOM tree Document. How do I...
  8. BTCMan

    parsing (x,y,z)

    Hi people, I need to extract some data from the pattern pattern: (xxx,yyy,zzzz) The output should be handled like this: var1 = xxx; var2 = yyy; var3 = zzz; Also, the digits may vary like: (xxx) OR (xxx,yyy) I want to avoid using String split method or to remove the "(" and the ")"...
  9. BTCMan

    How to set a max timeout for the script execution?

    Hi people, I wrote a TCL script and now I am facing problems because I did not specify a timeout condition - I don't know how to do that in TCL!Basically I want that my program continues its execution but ensuring that the timeout limit is never crossed. This is what I tried (among other...
  10. BTCMan

    extract filename from full path name

    Hi people, can somebody tells me how can I extract the file name from a variable full path (path + filename)? Sample: set fullpathinfo "/aaa/.../bbb/ccc/filename1.txt" set filenameresult "" [unknow code here to extract only filename1.txt and put it into variable filenameresult] [...] puts...
  11. BTCMan

    reading csh script return codes

    Hi all, I have to execute a unix cshell script inside my TCL script and then read its return code. The cshell script return codes can be: 0 - 100 % success 1 - partial success 2 - error The dummy cshell script named "dummy_script.sh" is below: ------------------- #!/bin/ksh echo Cshell...

Part and Inventory Search

Back
Top