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 strongm 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: *

  1. Hammer

    using scalar to open and create file

    You need to read about safe cgi programming before you implement something like. http://www.w3.org/Security/Faq/wwwsf4.html particularly answer 3 in Q6
  2. Hammer

    newbie question, exec shell command in perl

    My knowledge is limited, someone may suggest a better way, but you might try something like this. Here we call the cat program to display the variable values. Substitute cat accordingly. #!/usr/bin/perl -w use strict; my $oldpasswd = "oldpass"; my $newpasswd = "newpass"; my...
  3. Hammer

    array problem

    ... and just for fun, an alternative solution: void Lcd_Printf(char *incoming) { int Counter; putchar ('['); for (Counter = 0; *incoming; Counter++, incoming++) { if (*incoming == '*' && *(incoming+1) == 's') { putchar(' '); incoming++; } else {...
  4. Hammer

    How to check if a string is an integer

    Depending on your exact requirements (which are slightly unclear), strtol() might not do what you need. You start by saying: >>How do I check if a string is an integer and then later say: >>how do I know whether Query string contains only integers These are two different requirements. To...
  5. Hammer

    Urgent gdb debugger help!!!

    I don't know what's causing the problem. I'd suggest you start by upgrading to the latest version of gcc/gdb to see if it's a problem in that area.
  6. Hammer

    Urgent gdb debugger help!!!

    /cygdrive/c/junk/c>gcc -ggdb junk1.c /cygdrive/c/junk/c>gdb ./a.exe GNU gdb 2003-03-03-cvs (cygwin-special) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain...
  7. Hammer

    dynamic allocation of struct

    Use strcpy() to copy a string. However, I'd guess that your makeChar isn't really doing what you want. Salem's version (makeBool) was OK, because a bool is of fixed size. The makeChar version has single characters that are obviously the same size (1 byte), but try to store line of text from a...
  8. Hammer

    how to install cvs?

    hhmmm... are you sure you've imported/added the files correctly? Maybe try again?
  9. Hammer

    how to install cvs?

    That's odd. Do you see them if you list them in the repository with: >cvs ls -lR
  10. Hammer

    Capture output of "cvs update" / tool to summarize changes?

    What OS are you using? If you're on unix, you can redirect the output to a file like so: command_here >output.log 2>&1
  11. Hammer

    How do I find and return first occurence of a alpha character?

    Or write your own: Walk through the array with a loop, checking each character with isalpha() (ctype.h) and '\0'. Something like: char *p = mystring; while isalpha (*p) == 0 and *p != '\0' Increment p If *p != '\0' Then *p must be alpha
  12. Hammer

    Semaphore problem

    @chipperMDW : no worries, I knew what you meant! :-D @thumpkidd9: glad you got it going!
  13. Hammer

    Semaphore problem

    ... yeah, was just about to post a "try cleaning up the ipc memory" message to you! :-)
  14. Hammer

    Semaphore problem

    So, you're out of space then ! Better free some up! Out of interest, what value does N have at the time of calling semget()?
  15. Hammer

    Semaphore problem

    .. and what does perror("semget"); tell you? Replace the printf() with perror().
  16. Hammer

    Semaphore problem

    Do you have an "if" statement in there?
  17. Hammer

    how to install cvs?

    The manual available on this page is worth a read: https://ccvs.cvshome.org/servlets/ProjectDocumentList Create a repository: cvs -d <full path directory name> init (manual section 2.6, Creating a repository) Then use import to create a project within the repository. There are examples in the...
  18. Hammer

    Unable to Ping local IP address

    Use netstat -rn to show where it thinks it should be routing the request. Use ifconfig -a to show your interface definitions to be sure you've configured the addresses correctly.
  19. Hammer

    Simple Function Problems

    >>returning address of local variable or temporary You are returning "Error", which a variable local to the MoveToHold function. Once that function completes, the Error variable goes out of scope (and existance!). Normally, when returning a functions result, you'd pass back a number rather...

Part and Inventory Search

Back
Top