Skip to content

Commit

Permalink
Fixed identation and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AKuHAK committed Jan 29, 2021
1 parent 0cf1e05 commit 46ca19b
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 30 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig: http://EditorConfig.org

# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 1 space indentation
[*.{c,h,js,css,html}]
indent_style = space
indent_size = 1

# Tab indentation
[Makefile*]
indent_style = tab
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
else
LIBS = -lwsock32 -lpthreadGC2
endif

ifeq "x$(PREFIX)" "x"
PREFIX = $(PS2DEV)
endif
Expand Down
8 changes: 4 additions & 4 deletions doc/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. The name of the author(s) may not be used to endorse or promote products
* 3. The name of the author(s) may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
Expand Down
2 changes: 1 addition & 1 deletion doc/ps2link-protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
tell it what to do. These are simple commands sent as single packets for
executing programs, resetting ps2link or other things. This list may grow
as time goes on and new functionality is added to ps2link.

----------------------------
0xBABE0201 (reset command)
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/fsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
if (!strcmp(temp, "pfs")) { printf(" pfs - Playstation File System.\n"); } else
if (!strcmp(temp, "dev9x")) { printf(" dev9x - Blah blah blah.\n"); } else

//
//
{ printf(" %s\n", temp); }

// Increment temp.
Expand Down
2 changes: 1 addition & 1 deletion src/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Start up winsock.
if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) { return -1; }

// End function.
// End function.
return 0;

}
Expand Down
18 changes: 9 additions & 9 deletions src/ps2link.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,13 @@

// Perform the request.
// do we need to use mode in here: request->mode ?

#ifdef _WIN32
result = mkdir(request->name);
result = mkdir(request->name);
#else
result = mkdir(request->name, request->mode);
#endif

// Send the response.
return ps2link_response_mkdir(result);
}
Expand Down Expand Up @@ -589,10 +589,10 @@ int ps2link_request_getstat(void *packet) {

// Fix the arguments.
fix_pathname(request->name);

// Fetch the entry's statistics.
ret = stat(request->name, &stats);

if (ret == 0) {
// Convert the mode.
mode = (stats.st_mode & 0x07);
Expand All @@ -601,7 +601,7 @@ int ps2link_request_getstat(void *packet) {
if (S_ISLNK(stats.st_mode)) { mode |= 0x08; }
#endif
if (S_ISREG(stats.st_mode)) { mode |= 0x10; }

// Convert the creation time.
loctime = localtime(&(stats.st_ctime));
ctime[6] = (unsigned char)loctime->tm_year;
Expand All @@ -610,7 +610,7 @@ int ps2link_request_getstat(void *packet) {
ctime[3] = (unsigned char)loctime->tm_hour;
ctime[2] = (unsigned char)loctime->tm_min;
ctime[1] = (unsigned char)loctime->tm_sec;

// Convert the access time.
loctime = localtime(&(stats.st_atime));
atime[6] = (unsigned char)loctime->tm_year;
Expand All @@ -619,7 +619,7 @@ int ps2link_request_getstat(void *packet) {
atime[3] = (unsigned char)loctime->tm_hour;
atime[2] = (unsigned char)loctime->tm_min;
atime[1] = (unsigned char)loctime->tm_sec;

// Convert the last modified time.
loctime = localtime(&(stats.st_mtime));
mtime[6] = (unsigned char)loctime->tm_year;
Expand All @@ -629,7 +629,7 @@ int ps2link_request_getstat(void *packet) {
mtime[2] = (unsigned char)loctime->tm_min;
mtime[1] = (unsigned char)loctime->tm_sec;
}

return ps2link_response_getstat(ret, mode, 0, stats.st_size, ctime, atime, mtime, 0);
}

Expand Down
26 changes: 13 additions & 13 deletions src/ps2netfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,27 @@
#define PS2NETFS_COMMAND_DEVLIST 0xBEEF8F21

int ps2netfs_command_open(char *pathname, int flags);

int ps2netfs_command_close(int fd);

int ps2netfs_command_read(int fd, void *buffer, int size);

int ps2netfs_command_write(int fd, void *buffer, int size);

int ps2netfs_command_lseek(int fd, int offset, int whence);

// ioctl - unimplemented

int ps2netfs_command_delete(char *pathname, int flags);

int ps2netfs_command_mkdir(char *pathname, int flags);

int ps2netfs_command_rmdir(char *pathname, int flags);

int ps2netfs_command_dopen(char *pathname, int flags);

int ps2netfs_command_dclose(int dd);

int ps2netfs_command_dread(int dd, DIRENT *dirent);

// getstat - unimplemented
Expand All @@ -97,9 +97,9 @@
// chdir - unimplemented

int ps2netfs_command_sync(char *device, int flags);

int ps2netfs_command_mount(char *device, char *fsname, int flags, char *argv, int argc);

int ps2netfs_command_umount(char *device, int flags);

// lseek64 - unimplemented
Expand All @@ -117,5 +117,5 @@
// fstype - unimplemented

int ps2netfs_command_devlist(char *pathname, int flags, char *devlist);

#endif

0 comments on commit 46ca19b

Please sign in to comment.