Cleanup: use full scentences for code-comments & minor corrections
This commit is contained in:
parent
fbe16bc1eb
commit
116264c310
|
@ -86,11 +86,11 @@ char BKE_imtype_valid_depths(char imtype);
|
|||
|
||||
/**
|
||||
* String is from command line `--render-format` argument,
|
||||
* keep in sync with `creator_args.c` help info.
|
||||
* keep in sync with `creator_args.cc` help info.
|
||||
*/
|
||||
char BKE_imtype_from_arg(const char *imtype_arg);
|
||||
|
||||
/* Conversion between ImBuf settings. */
|
||||
/* Conversion between #ImBuf settings. */
|
||||
|
||||
void BKE_image_format_from_imbuf(struct ImageFormatData *im_format, const struct ImBuf *imbuf);
|
||||
void BKE_image_format_to_imbuf(struct ImBuf *ibuf, const struct ImageFormatData *imf);
|
||||
|
|
|
@ -112,7 +112,7 @@ void BKE_scene_object_base_flag_sync_from_base(Base *base);
|
|||
*/
|
||||
void BKE_scene_set_background(Main *bmain, Scene *sce);
|
||||
/**
|
||||
* Called from `creator_args.c`.
|
||||
* Called from `creator_args.cc`.
|
||||
*/
|
||||
Scene *BKE_scene_set_name(Main *bmain, const char *name);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_string_utils.hh"
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
#include "BLI_sys_types.h" /* For `intptr_t` support. */
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
/** Sizes above this must be allocated. */
|
||||
|
@ -292,19 +292,19 @@ bool BLI_file_is_writable(const char *filepath)
|
|||
{
|
||||
bool writable;
|
||||
if (BLI_access(filepath, W_OK) == 0) {
|
||||
/* file exists and I can write to it */
|
||||
/* File exists and I can write to it. */
|
||||
writable = true;
|
||||
}
|
||||
else if (errno != ENOENT) {
|
||||
/* most likely file or containing directory cannot be accessed */
|
||||
/* Most likely file or containing directory cannot be accessed. */
|
||||
writable = false;
|
||||
}
|
||||
else {
|
||||
/* file doesn't exist -- check I can create it in parent directory */
|
||||
/* File doesn't exist -- check I can create it in parent directory. */
|
||||
char parent[FILE_MAX];
|
||||
BLI_path_split_dir_part(filepath, parent, sizeof(parent));
|
||||
#ifdef WIN32
|
||||
/* windows does not have X_OK */
|
||||
/* Windows does not have X_OK. */
|
||||
writable = BLI_access(parent, W_OK) == 0;
|
||||
#else
|
||||
writable = BLI_access(parent, X_OK | W_OK) == 0;
|
||||
|
@ -321,7 +321,7 @@ bool BLI_file_touch(const char *filepath)
|
|||
int c = getc(f);
|
||||
|
||||
if (c == EOF) {
|
||||
/* Empty file, reopen in truncate write mode... */
|
||||
/* Empty file, reopen in truncate write mode. */
|
||||
fclose(f);
|
||||
f = BLI_fopen(filepath, "w+b");
|
||||
}
|
||||
|
@ -1228,7 +1228,7 @@ static int delete_soft(const char *file, const char **error_message)
|
|||
int pid = fork();
|
||||
|
||||
if (pid != 0) {
|
||||
/* Parent process */
|
||||
/* Parent process. */
|
||||
int wstatus = 0;
|
||||
|
||||
waitpid(pid, &wstatus, 0);
|
||||
|
@ -1249,7 +1249,7 @@ static int delete_soft(const char *file, const char **error_message)
|
|||
execvp(args[0], (char **)args);
|
||||
|
||||
*error_message = "Forking process failed.";
|
||||
return -1; /* This should only be reached if execvp fails and stack isn't replaced. */
|
||||
return -1; /* This should only be reached if `execvp` fails and stack isn't replaced. */
|
||||
}
|
||||
# endif
|
||||
|
||||
|
@ -1355,13 +1355,13 @@ static int copy_callback_pre(const char *from, const char *to)
|
|||
return RecursiveOp_Callback_Error;
|
||||
}
|
||||
|
||||
/* create a directory */
|
||||
/* Create a directory. */
|
||||
if (mkdir(to, st.st_mode)) {
|
||||
perror("mkdir");
|
||||
return RecursiveOp_Callback_Error;
|
||||
}
|
||||
|
||||
/* set proper owner and group on new directory */
|
||||
/* Set proper owner and group on new directory. */
|
||||
if (chown(to, st.st_uid, st.st_gid)) {
|
||||
perror("chown");
|
||||
return RecursiveOp_Callback_Error;
|
||||
|
@ -1388,12 +1388,12 @@ static int copy_single_file(const char *from, const char *to)
|
|||
}
|
||||
|
||||
if (S_ISLNK(st.st_mode)) {
|
||||
/* symbolic links should be copied in special way */
|
||||
/* Symbolic links should be copied in special way. */
|
||||
char *link_buffer;
|
||||
int need_free;
|
||||
int64_t link_len;
|
||||
|
||||
/* get large enough buffer to read link content */
|
||||
/* Get large enough buffer to read link content. */
|
||||
if ((st.st_size + 1) < sizeof(buf)) {
|
||||
link_buffer = buf;
|
||||
need_free = 0;
|
||||
|
@ -1431,7 +1431,7 @@ static int copy_single_file(const char *from, const char *to)
|
|||
return RecursiveOp_Callback_OK;
|
||||
}
|
||||
if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode) || S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode)) {
|
||||
/* copy special type of file */
|
||||
/* Copy special type of file. */
|
||||
if (mknod(to, st.st_mode, st.st_rdev)) {
|
||||
perror("mknod");
|
||||
return RecursiveOp_Callback_Error;
|
||||
|
|
|
@ -290,8 +290,6 @@ int main(int argc,
|
|||
int argv_num;
|
||||
#endif
|
||||
|
||||
/* --- end declarations --- */
|
||||
|
||||
/* Ensure we free data on early-exit. */
|
||||
CreatorAtExitData app_init_data = {nullptr};
|
||||
BKE_blender_atexit_register(callback_main_atexit, &app_init_data);
|
||||
|
|
Loading…
Reference in New Issue