version 2.8, 2005/02/27 05:21:08
|
version 2.10, 2005/02/27 08:31:36
|
|
|
return 0; | return 0; |
} | } |
| |
FNFDINOTIFY(dummy_notification){ |
|
printf(" FNFDINOTIFY just called with %d, %d \n",fdint,pfdin); |
|
return 0; |
|
} |
|
| |
|
/*Possible non trivial addition: |
|
Notify receives some information about the cab file(see FDI documentation). |
|
Since this info is different depending on the value of fdint, and Notify should |
|
be generic, it is not simple or nice to check this information. |
|
*/ |
FNFDINOTIFY(notification_function) | FNFDINOTIFY(notification_function) |
{ | { |
printf(" FNFDINOTIFY real just called with %d, %d \n",fdint,pfdin); |
|
switch (fdint) | switch (fdint) |
{ | { |
case fdintCABINET_INFO: | case fdintCABINET_INFO: |
{ | { |
printf("fdintCABINET_INFO\n"); |
|
return 0; | return 0; |
} | } |
case fdintPARTIAL_FILE: | case fdintPARTIAL_FILE: |
{ | { |
printf("dintPARTIAL_FILE\n"); |
|
return 0; | return 0; |
} | } |
case fdintCOPY_FILE: | case fdintCOPY_FILE: |
{ | { |
int fih = 0; | int fih = 0; |
char target[256]; | char target[256]; |
|
|
printf("fdintCOPY_FILE\n"); |
|
printf(" file name: %s\n", pfdin->psz1); |
|
sprintf(target, "./%s",pfdin->psz1); | sprintf(target, "./%s",pfdin->psz1); |
printf("%s\n",target); |
|
#ifdef TVFS |
|
fih = tvfs_open (target, | fih = tvfs_open (target, |
_O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL, | _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL, |
_S_IREAD | _S_IWRITE | _S_IREAD | _S_IWRITE |
); | ); |
return fih; | return fih; |
#else |
|
fih = real_open (target, |
|
_O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL, |
|
_S_IREAD | _S_IWRITE |
|
); |
|
return fih; |
|
#endif |
|
} | } |
case fdintCLOSE_FILE_INFO: | case fdintCLOSE_FILE_INFO: |
{ | { |
|
|
result = tvfs_compare( filebuf , file_simple_txt, size_simple_txt); | result = tvfs_compare( filebuf , file_simple_txt, size_simple_txt); |
| |
*/ | */ |
return 0; |
tvfs_close(pfdin->hf); |
|
return TRUE; |
} | } |
case fdintNEXT_CABINET: | case fdintNEXT_CABINET: |
{ | { |
|
|
printf("fdintNEXT_CABINET\n"); |
|
return 0; | return 0; |
} | } |
case fdintENUMERATE: | case fdintENUMERATE: |
{ | { |
printf("fdintENUMERATE\n"); |
|
return 0; | return 0; |
} | } |
} | } |