Search:

Type: Posts; User: IsmAvatar2

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    22
    Views
    32,733

    vsftpd and Debian.

    vsftpd and Debian.
  2. Replies
    22
    Views
    32,733

    brewbuck: I'm not sure what you mean. I have an...

    brewbuck: I'm not sure what you mean.
    I have an FTP server which is set to *receive* files. Various people will ftp in and upload a file to the server. It is then the server's responsibility to...
  3. Replies
    22
    Views
    32,733

    brewbuck: The program that is depositing the...

    brewbuck: The program that is depositing the files is ftp. If you want to say FTP is broken, be my guest.

    Zlatko: Wouldn't it be more efficient to just get the d_ino from the dirent, rather than...
  4. Replies
    22
    Views
    32,733

    Zlatko: I cannot edit the source of the process...

    Zlatko: I cannot edit the source of the process modifying these files. /proc/pid/fd sounds like a good idea, but how do I know which ones refer to the file that I'm interested in?

    itCbitC: In...
  5. Replies
    22
    Views
    32,733

    itCbitC: int main() { char *fn =...

    itCbitC:

    int main() {
    char *fn = "/tmp/test.txt"; //the test file
    FILE *F = fopen(fn,"w"); //this simulates another process writing to a file but not closing it yet

    //We now attempt to...
  6. Replies
    22
    Views
    32,733

    My concern is that my program may not have access...

    My concern is that my program may not have access to lsof or fuser, as they oftentimes require root privileges. I was also hoping that I might just be able to use their lower level routines without...
  7. Replies
    22
    Views
    32,733

    Yes. My program is to scan the directory for...

    Yes. My program is to scan the directory for *new*, *completed* files created by another process.

    Program 1 (not in my control) opens file "out1.txt" for writing.
    P1 writes some bytes to file....
  8. Replies
    22
    Views
    32,733

    Check if file is opened for writing (unix)

    My program is to scan a directory for new files, and then forward them along. However, I cannot forward a file until it is complete, and as far as I'm aware, the only way to tell if the file is...
  9. Replies
    1
    Views
    3,789

    Multiple servers on one network (winsock)

    Let's suppose that I have a basic network with 3 computers connected to each other via Ethernet. Two of those computers wish to host my server program. The third computer wishes to run my client...
  10. Replies
    0
    Views
    6,686

    Xlib Fullscreen and/or borderless

    I'm a low level C programmer, and through an odd turn of events, I've come to start writing a GUI in Linux via Xlib (seeing as that seems to be the low level solution).
    That said, I'll jump right...
  11. Replies
    1
    Views
    5,843

    Fixed

    I've upgraded to Fedora 9 and reinstalled pcap-devel from yum, and this has fixed the problem.
  12. Replies
    1
    Views
    5,843

    pcap and ipv6

    I'm writing a C program using pcap in which it sniffs for ipv6 packets, specifically ones of type icmp6. I know the filter for this is "ip6 proto icmp6", however during runtime it crashes with "ip6...
  13. Replies
    7
    Views
    4,695

    If you want spaces between the numbers, simply...

    If you want spaces between the numbers, simply put a space after the %d on lines 8 and 11 of my code, and double the number of spaces printed prior to the row (line 5):


    int x,y;
    int rows =...
  14. Replies
    11
    Views
    1,416

    I can't even get it to compile, it gives me: ...

    I can't even get it to compile, it gives me:

    error at line 23 (end:) label at end of compound statement
    warning at line 3 (void main(void)) return type of 'main' is not 'int'

    Last time i...
  15. Replies
    7
    Views
    4,695

    int x,y; int rows = 10; for (y = 1; y

    int x,y;
    int rows = 10;
    for (y = 1; y <= rows; ++y) {
    for (x = y; x < rows; ++x) {
    printf(" ");
    }
    for (x = 0; x < y; ++x) {
    printf("&#37;d",(y+x) % 10);
    }
    for (x = y - 1; x >...
  16. A common approach to linked lists is to keep the...

    A common approach to linked lists is to keep the data separate from the linked list, and to keep the linked list open ended in terms of what data it can take in. To do this, we usually use a void...
  17. Replies
    2
    Views
    1,493

    In a Dictionary of unknown size N, with unknown...

    In a Dictionary of unknown size N, with unknown length M (worst case), provided it is sorted, you can do a lookup in M*log2(N) worst-case and usual case. In a poorly defined hash, the number of...
  18. Replies
    2
    Views
    1,692

    Ah, I thought I might get trouble from having a...

    Ah, I thought I might get trouble from having a string pointer with no address, but the compiler didn't give me any warnings or anything. Guess that explains it. I pointed it to fn, since the...
  19. Replies
    2
    Views
    1,692

    text file copying incorrectly

    I have a text file that looks like this:


    hello world
    hello.worldfull
    this.12345678.87654321
    fullness!

    And my program will basically just open the file, open an output file (name determined...
  20. Replies
    7
    Views
    1,840

    look at the fscanf function in stdio.h. It works...

    look at the fscanf function in stdio.h. It works similar to printf, only it reads input from a file rather than printing output to a buffer. The first argument is the file, the second argument is the...
  21. Replies
    5
    Views
    1,541

    When reading the input from the file, use fscanf,...

    When reading the input from the file, use fscanf, like this:


    FILE *f;
    patch p;
    ....
    fscanf(f,"&#37;d %d",p->height,p->width);
  22. Thread: Pointers

    by IsmAvatar2
    Replies
    9
    Views
    1,211

    I'd consider using a different loop method. First...

    I'd consider using a different loop method. First off, there's no guarantee that the 11th character of the s array will be a null terminator, since you only allocated 10 characters, so it's undefined...
  23. Replies
    9
    Views
    3,381

    Note that strcmp() does not perform bounds...

    Note that strcmp() does not perform bounds checking, and thus risks overrunning str1 or str2. For a similar (and safer) function that includes bounds checking, see strncmp().


    #include <string.h>...
  24. I think the library you need is dirent.h this...

    I think the library you need is dirent.h
    this will give you functions like opendir() and readdir()
    You might also need sys/stat.h for stat()
  25. It seems to me that your database will end up...

    It seems to me that your database will end up looking like this:

    [ Last, First, User, Email, Major, Class, Next ]
    0 = [ Allen, 0, 0, 0, 0, 0, null ]
    1 = [ 0, Donaldson, 0, 0, 0, 0, 0 ]
    2 = [ 0,...
Results 1 to 25 of 40
Page 1 of 2 1 2