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 Andrzejek 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. dwhalen

    calling free on a char * throwing Segmentation fault

    Hey, Thanks for your reply. I was just going over my code again and noticed the same thing!! Arg, stupid mistake! I meant to comment that line out because that was the old way before I used strdup, but forgot to. Thanks for your help, this is a great forum. Later
  2. dwhalen

    calling free on a char * throwing Segmentation fault

    Hello, just before my program exits I am trying to free up all malloced memory, however when I try to call free on one of my char * I get a segmentation fault. Here is some of my code. Here is my structure....it is a linked list: //this is a structure for our file information struct...
  3. dwhalen

    free and malloc question

    Thanks for the answer. So just to be clear, if I don't call free on all my malloced pointers when the program ends the OS will "probably" free up the memory for me anyway, but I should really do it myself just in case another program calls my program. Plus it is just good coding practices...
  4. dwhalen

    free and malloc question

    Hey, I am new to C and I am writing a small program similar to grep. I am using some linked list structures so I don't have to have a staticly defined array. I use malloc to create each new structure. What I am wondering is, do I have to call free on each pointer when the program ends? I...
  5. dwhalen

    set focus on text box after validation

    Sorry, But the first time I submitted there was an error so I hit back and submitted again. Seems to have submitted twice :} Later
  6. dwhalen

    set focus on text box after validation

    Hey, You seem to have extra { and } in there. But to set a fields focus you would do this field.focus(); with field being a reference to the field object for example: document.formname.txtActRevenue; Hope that helps. Later
  7. dwhalen

    set focus on text box after validation

    Hey, You seem to have extra { and } in there. But to set a field's focus you would do this field.focus(); with field being a reference to the field object for example: document.formname.txtActRevenue; Hope that helps. Later
  8. dwhalen

    Safari Iframe Problem

    Hey, I have a js function that submits a form to an iframe. The js to do it is like so //sending in our form reference and where we want to //post the form function submitTemp(form,where) { //making the forms target an iframe form.target="tempSaveIframe"; form.method="POST"...
  9. dwhalen

    Need help creating a online Phone Directory

    Are you looking for someone to do this for you or do you want to know how to do it? Because your problem isn't that difficult for someone who knows how to use perl,databases,apache,server configuration ....and many other things but this isn't something that can be solved by someone just posting...
  10. dwhalen

    Attempt to free unreferenced scalar:

    Hey, We just updated our Perl 5.6.0 to version 5.8.2 and this error keeps coming up in the Apache error_log: Attempt to free unreferenced scalar: SV 0x8cbb26c at /usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Registry.pm line 149. Sometimes it is different modules other than Registry.pm...
  11. dwhalen

    Getting current line number

    Hey, Sorry I didn't respond sooner but I took yesterday off :). The caller thing works great! Thanks for the help everyone. Later
  12. dwhalen

    Getting current line number

    Yeah, I thought the same thing but that gives you the line number of the current opened file handle....close but no cigar :) Thanks Later
  13. dwhalen

    Getting current line number

    Hey, I am trying to write personal error_log for a perl program I wrote. What I want in the error_log is the line number where the error occured, the file name and the error message. I know how to get the file name ($0), and I will send my own text message, but is there anyway to get what...
  14. dwhalen

    Digest::MD5 help

    hehehe...yeah, I just wanted to give an idea of how I was comparing and where it was failing. As for the new line character, well I have thought of that but I dismissed it because the password is hardcoded on both the dev system and the production system in a file that is called from cron. For...
  15. dwhalen

    Digest::MD5 help

    Hello, I work on a web application that uses md5_hex to store and verify passwords. I needed to write a perl program that can be run from the command line and connects up to the database but the user must pass in a username and password. I made the authentication pretty much exactly the same...
  16. dwhalen

    grep an array for an element

    I wrote this whilst other people replied but here it is anyway......probably a little verbose but it works :). You can make it better but I am too busy at the moment. #!/usr/bin/perl -w use strict; #make our variables my @a1 = qw/1 3 5 7 9 11 13/; my @a2 = qw/1 2 3 4 5 6 7/; my @new = ()...
  17. dwhalen

    Converting perl statements to mod_perl statements

    Hey, I have a mod_perl question. When the user clicks on a link I want them to be able to download a file. Below is the code I use to do it. It works fine. However, I want to make sure I am using mod_perl to it fullest, so I want to convert some of the statments to more mod_perlish (hope that...
  18. dwhalen

    Syntactic Sugar and speed

    Thanks for your input. Yeah, I didn't think there was any difference in speed or if any very miniscule. However, I like to program that way because I feel it is eaiser to read and debug, whereas some do not and I get the feeling that they feel it is bad programming or something....like doing a...
  19. dwhalen

    Syntactic Sugar and speed

    Do the various 'Syntactic Sugar' options slow down perl programs? ex: #$r is an apache request object $r->print("<form name=\"thisform\""); #vs. $r->print(qq@ <form name="thisform" @); I am just wondering because I find the qq makes complicated html print statements...
  20. dwhalen

    reg expresion problem

    Hey I think I may have solved my problem...not the way I wanted to do it...but hey it works. This is going back to what Paul said The thing was, I didn't want to set the | symbol to \| in my select box because I use it elsewhere. So in my map I just set a new variable to with the pipe...

Part and Inventory Search

Back
Top