Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
10 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
17 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
147 लाइनें
सभी को कॉपी करें
43 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
167 लाइनें
सभी को कॉपी करें
/*
/*
* Directory utility functions.
* Directory utility functions.
*
*
* Author:
* Author:
* Gonzalo Paniagua Javier (gonzalo@novell.com)
* Gonzalo Paniagua Javier (gonzalo@novell.com)
*
*
* (C) 2006 Novell, Inc.
* (C) 2006 Novell, Inc.
*
*
* Permission is hereby granted, free of charge, to any person obtaining
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* included in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#include <glib.h>
#include <glib.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <unistd.h>
#include <unistd.h>
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#include <dirent.h>
//
#include <dirent.h>
#include <psp2/io/dirent.h>
#include <psp2/io/stat.h>
#define opendir sceIoDopen
#define closedir sceIoDclose
#define readdir sceIoDread
#define mkdir sceIoMkdir
#define DIR SceUID
#define dirent SceIoDirent
struct _GDir {
struct _GDir {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
DIR
*
dir;
DIR
dir;
#ifndef HAVE_REWINDDIR
#ifndef HAVE_REWINDDIR
char *path;
char *path;
#endif
#endif
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
char current[256];
};
};
GDir *
GDir *
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
g_dir_open (const gchar *path, guint flags, GError **error)
g_dir_open (const gchar *path, guint flags, GError **error)
{
{
GDir *dir;
GDir *dir;
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
(void) flags; /* this is not used */
(void) flags; /* this is not used */
dir = g_new (GDir, 1);
dir = g_new (GDir, 1);
dir->dir = opendir (path);
dir->dir = opendir (path);
if (dir->dir
== NULL
) {
if (dir->dir
<0
) {
if (error) {
if (error) {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
gint err =
errno
;
gint err =
dir->dir
;
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
*error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err));
}
}
g_free (dir);
g_free (dir);
return NULL;
return NULL;
}
}
#ifndef HAVE_REWINDDIR
#ifndef HAVE_REWINDDIR
dir->path = g_strdup (path);
dir->path = g_strdup (path);
#endif
#endif
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return dir;
return dir;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
}
}
const gchar *
const gchar *
g_dir_read_name (GDir *dir)
g_dir_read_name (GDir *dir)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
struct
dirent
*
entry;
dirent
entry;
int r;
memset(&entry,0,sizeof(dirent));
g_return_val_if_fail (dir != NULL && dir->dir != NULL, NULL);
g_return_val_if_fail (dir != NULL && dir->dir != NULL, NULL);
do {
do {
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
entry
= readdir (dir->dir
);
r
= readdir (dir->dir
,&entry
);
if (
entry == NULL
)
if (
r<0
)
return NULL;
return NULL;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
} while ((strcmp (entry
->
d_name, ".") == 0) || (strcmp (entry
->
d_name, "..") == 0));
} while ((strcmp (entry
.
d_name, ".") == 0) || (strcmp (entry
.
d_name, "..") == 0));
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return
entry
->
d_name
;
strcpy(dir->current,
entry
.
d_name
);
return dir->current
;
}
}
void
void
g_dir_rewind (GDir *dir)
g_dir_rewind (GDir *dir)
{
{
g_return_if_fail (dir != NULL && dir->dir != NULL);
g_return_if_fail (dir != NULL && dir->dir != NULL);
#ifndef HAVE_REWINDDIR
#ifndef HAVE_REWINDDIR
closedir (dir->dir);
closedir (dir->dir);
dir->dir = opendir (dir->path);
dir->dir = opendir (dir->path);
#else
#else
rewinddir (dir->dir);
rewinddir (dir->dir);
#endif
#endif
}
}
void
void
g_dir_close (GDir *dir)
g_dir_close (GDir *dir)
{
{
g_return_if_fail (dir != NULL && dir->dir != 0);
g_return_if_fail (dir != NULL && dir->dir != 0);
closedir (dir->dir);
closedir (dir->dir);
#ifndef HAVE_REWINDDIR
#ifndef HAVE_REWINDDIR
g_free (dir->path);
g_free (dir->path);
#endif
#endif
dir->dir = NULL;
dir->dir = NULL;
g_free (dir);
g_free (dir);
}
}
int
int
g_mkdir_with_parents (const gchar *pathname, int mode)
g_mkdir_with_parents (const gchar *pathname, int mode)
{
{
char *path, *d;
char *path, *d;
int rv;
int rv;
if (!pathname || *pathname == '\0') {
if (!pathname || *pathname == '\0') {
errno = EINVAL;
errno = EINVAL;
return -1;
return -1;
}
}
d = path = g_strdup (pathname);
d = path = g_strdup (pathname);
if (*d == '/')
if (*d == '/')
d++;
d++;
while (TRUE) {
while (TRUE) {
if (*d == '/' || *d == '\0') {
if (*d == '/' || *d == '\0') {
char orig = *d;
char orig = *d;
*d = '\0';
*d = '\0';
rv = mkdir (path, mode);
rv = mkdir (path, mode);
if (rv == -1 && errno != EEXIST) {
if (rv == -1 && errno != EEXIST) {
g_free (path);
g_free (path);
return -1;
return -1;
}
}
*d++ = orig;
*d++ = orig;
while (orig == '/' && *d == '/')
while (orig == '/' && *d == '/')
d++;
d++;
if (orig == '\0')
if (orig == '\0')
break;
break;
} else {
} else {
d++;
d++;
}
}
}
}
g_free (path);
g_free (path);
return 0;
return 0;
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
/* * Directory utility functions. * * Author: * Gonzalo Paniagua Javier (gonzalo@novell.com) * * (C) 2006 Novell, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <glib.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <dirent.h> struct _GDir { DIR *dir; #ifndef HAVE_REWINDDIR char *path; #endif }; GDir * g_dir_open (const gchar *path, guint flags, GError **error) { GDir *dir; g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); (void) flags; /* this is not used */ dir = g_new (GDir, 1); dir->dir = opendir (path); if (dir->dir == NULL) { if (error) { gint err = errno; *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err)); } g_free (dir); return NULL; } #ifndef HAVE_REWINDDIR dir->path = g_strdup (path); #endif return dir; } const gchar * g_dir_read_name (GDir *dir) { struct dirent *entry; g_return_val_if_fail (dir != NULL && dir->dir != NULL, NULL); do { entry = readdir (dir->dir); if (entry == NULL) return NULL; } while ((strcmp (entry->d_name, ".") == 0) || (strcmp (entry->d_name, "..") == 0)); return entry->d_name; } void g_dir_rewind (GDir *dir) { g_return_if_fail (dir != NULL && dir->dir != NULL); #ifndef HAVE_REWINDDIR closedir (dir->dir); dir->dir = opendir (dir->path); #else rewinddir (dir->dir); #endif } void g_dir_close (GDir *dir) { g_return_if_fail (dir != NULL && dir->dir != 0); closedir (dir->dir); #ifndef HAVE_REWINDDIR g_free (dir->path); #endif dir->dir = NULL; g_free (dir); } int g_mkdir_with_parents (const gchar *pathname, int mode) { char *path, *d; int rv; if (!pathname || *pathname == '\0') { errno = EINVAL; return -1; } d = path = g_strdup (pathname); if (*d == '/') d++; while (TRUE) { if (*d == '/' || *d == '\0') { char orig = *d; *d = '\0'; rv = mkdir (path, mode); if (rv == -1 && errno != EEXIST) { g_free (path); return -1; } *d++ = orig; while (orig == '/' && *d == '/') d++; if (orig == '\0') break; } else { d++; } } g_free (path); return 0; }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
/* * Directory utility functions. * * Author: * Gonzalo Paniagua Javier (gonzalo@novell.com) * * (C) 2006 Novell, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <glib.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> //#include <dirent.h> #include <psp2/io/dirent.h> #include <psp2/io/stat.h> #define opendir sceIoDopen #define closedir sceIoDclose #define readdir sceIoDread #define mkdir sceIoMkdir #define DIR SceUID #define dirent SceIoDirent struct _GDir { DIR dir; #ifndef HAVE_REWINDDIR char *path; #endif char current[256]; }; GDir * g_dir_open (const gchar *path, guint flags, GError **error) { GDir *dir; g_return_val_if_fail (path != NULL, NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); (void) flags; /* this is not used */ dir = g_new (GDir, 1); dir->dir = opendir (path); if (dir->dir <0) { if (error) { gint err = dir->dir; *error = g_error_new (G_LOG_DOMAIN, g_file_error_from_errno (err), strerror (err)); } g_free (dir); return NULL; } #ifndef HAVE_REWINDDIR dir->path = g_strdup (path); #endif return dir; } const gchar * g_dir_read_name (GDir *dir) { dirent entry; int r; memset(&entry,0,sizeof(dirent)); g_return_val_if_fail (dir != NULL && dir->dir != NULL, NULL); do { r = readdir (dir->dir,&entry); if (r<0) return NULL; } while ((strcmp (entry.d_name, ".") == 0) || (strcmp (entry.d_name, "..") == 0)); strcpy(dir->current,entry.d_name); return dir->current; } void g_dir_rewind (GDir *dir) { g_return_if_fail (dir != NULL && dir->dir != NULL); #ifndef HAVE_REWINDDIR closedir (dir->dir); dir->dir = opendir (dir->path); #else rewinddir (dir->dir); #endif } void g_dir_close (GDir *dir) { g_return_if_fail (dir != NULL && dir->dir != 0); closedir (dir->dir); #ifndef HAVE_REWINDDIR g_free (dir->path); #endif dir->dir = NULL; g_free (dir); } int g_mkdir_with_parents (const gchar *pathname, int mode) { char *path, *d; int rv; if (!pathname || *pathname == '\0') { errno = EINVAL; return -1; } d = path = g_strdup (pathname); if (*d == '/') d++; while (TRUE) { if (*d == '/' || *d == '\0') { char orig = *d; *d = '\0'; rv = mkdir (path, mode); if (rv == -1 && errno != EEXIST) { g_free (path); return -1; } *d++ = orig; while (orig == '/' && *d == '/') d++; if (orig == '\0') break; } else { d++; } } g_free (path); return 0; }
अंतर खोजें