Search:

Type: Posts; User: mingerso

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: Run Problem

    by mingerso
    Replies
    10
    Views
    1,581

    Uhm, trying searching for "disappears" in the...

    Uhm, trying searching for "disappears" in the FAQ....
  2. Replies
    2
    Views
    1,926

    I prefer postgresql but have never used it in a...

    I prefer postgresql but have never used it in a Windows environment. They also have pretty good documentation - check out http://www.postgresql.org/docs/8.3/interactive/ecpg.html and...
  3. Replies
    12
    Views
    12,200

    You have quite a few issues here and should take...

    You have quite a few issues here and should take the code that was posted earlier as an example to encrypt strings. You don't just pass the whole string but have to do multiple passes to...
  4. Replies
    12
    Views
    12,200

    As I linked to before, you need to download the...

    As I linked to before, you need to download the code from here: http://www.schneier.com/code/bfsh-koc.zip
    and you need to use the blowfish.c code when compiling.

    You could always use another...
  5. Replies
    12
    Views
    12,200

    You would probably want to make some wrapper...

    You would probably want to make some wrapper functions for encrypting and decrypting, but to change the password you have to use this:


    Blowfish_Init (&ctx, (unsigned char*)"TESTKEY", 7);
  6. Replies
    12
    Views
    12,200

    Heres an example that would work on strings: ...

    Heres an example that would work on strings:



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "blowfish.h"

    int main(int argc, char * argv[])
  7. Replies
    12
    Views
    12,200

    Look at the C example...

    Look at the C example http://www.schneier.com/code/bfsh-koc.zip
  8. Replies
    22
    Views
    14,461

    Yes, errors aplenty. Anyways, this little...

    Yes, errors aplenty.
    Anyways, this little tangent on this thread about casting could be summed up as:

    1. If invoking a C++ compiler on C code you should cast mallocs.
    2. If invoking a C...
  9. Replies
    22
    Views
    14,461

    Sorry, I'm an idiot and typed: extern C { }...

    Sorry, I'm an idiot and typed:


    extern C {
    }


    Forgot the quotes.
  10. Replies
    22
    Views
    14,461

    I tried a couple of tests on Linux with gcc but...

    I tried a couple of tests on Linux with gcc but could not figure out how to do this. You wouldn't happen to know the options to pass to gcc?

    As far as I have seen using gcc, you cannot do...
  11. Replies
    22
    Views
    14,461

    I guess I was not very clear. I was saying that...

    I guess I was not very clear. I was saying that he was saying compile as C code like:
    gcc -c test.c -o test.o

    and then follow with a C++ compiler:
    g++ test.o test2.cpp
  12. Replies
    22
    Views
    14,461

    I think this would be a common scenario where...

    I think this would be a common scenario where someone would combine C into C++: http://www.libsdl.org/

    And combining code compiled with a C compiler with a C++ compiler... can you do that? Or am I...
  13. Replies
    7
    Views
    2,253

    Or call fflush().

    Or call fflush().
  14. Replies
    3
    Views
    11,048

    This works on many platforms and was easy to use...

    This works on many platforms and was easy to use the few times I have:
    http://www.libsdl.org/
  15. Replies
    22
    Views
    14,461

    Also, I think the argument of casting comes from...

    Also, I think the argument of casting comes from a while back when it was needed (before ANSI/ISO). You would want to cast if you had changed your datatype from say: "double * d" to "struct s * d"...
  16. Replies
    11
    Views
    2,726

    Here's a corrected version with some error...

    Here's a corrected version with some error checking:


    #include <stdio.h>
    #include <assert.h>

    int main(int argc, char ** argv)
    {
    int i;
    int array[20];
  17. Replies
    23
    Views
    8,903

    Yes all very good points of preference... and...

    Yes all very good points of preference... and back to what was being said:

    "... so do something... or not"
  18. Replies
    23
    Views
    8,903

    That is the typical method but depends on what...

    That is the typical method but depends on what you're doing. It is not required and I see your point, but if you're going to be using pointer allocations this way you might want to make a wrapper...
  19. Replies
    23
    Views
    8,903

    This was mentioned earlier but heres an example...

    This was mentioned earlier but heres an example of realloc and not destroying your previous pointer ( so you can avoid bad free()'s and memory leaks ):



    char * add_space(char ** str)
    {
    int...
  20. Replies
    8
    Views
    1,740

    The main problem you will probably run into is...

    The main problem you will probably run into is having multiple objects that use the header with the function and linking all of the objects into the main executable. You basically are trying to...
  21. Thread: text files

    by mingerso
    Replies
    5
    Views
    1,509

    Multiple ways but look at these before...

    Multiple ways but look at these before attempting:
    1. http://linux.die.net/man/2/open
    2. http://linux.die.net/man/2/flock
    3. http://linux.die.net/man/2/fcntl (more complicated)

    Some simplified...
  22. Replies
    3
    Views
    6,322

    This may be what you are looking for:...

    This may be what you are looking for:
    http://www.enderunix.org/docs/en/rawipspoof/

    When using the ip and icmp headers you can define them yourself or they may differ from the example unless you...
  23. Replies
    8
    Views
    1,740

    Typically you would just have a prototype for the...

    Typically you would just have a prototype for the function in the header.
    See:
    http://en.wikipedia.org/wiki/Header_file
    and...
  24. Replies
    2
    Views
    2,323

    This might help you without using ncurses (only...

    This might help you without using ncurses (only tested on linux).


    #include <stdio.h>
    #include <stdarg.h>

    void print_pos(int x, int y, char * msg, ...)
    {
    /* sets the cursor */
    ...
  25. Here's a simple C example, should work just fine...

    Here's a simple C example, should work just fine but not really tested.



    #include <stdio.h>

    /* You had this set to 20 but I believe
    * you only had 18 answers actually set
    */
    #define...
Results 1 to 25 of 43
Page 1 of 2 1 2