📄 convert.c
字号:
/* convert.c -- convert between file name notations */#include "switches.h"#include "stdio.h"#include "string.h"#include "convert.h"char dir_separator = #ifdef MACINTOSH':';#endif#ifdef DOS'\\';#endif#ifdef UNIX'/';#endif#ifdef AMIGA'/';#endif/* Note: syntax error if not one and only one is defined (this is a feature) */int pauseflag;/* convert -- convert filename to local naming conventions *//**/void convert(char *filename){ int i; /* first test for problem characters */ for (i = strlen(filename); i >= 0; i--) { if (filename[i] == ':' || filename[i] == '\\') { fprintf(stderr, "WARNING: %s has one of \":\\\" and may not port.\n", filename); fprintf(stderr, " '/' should be used as directory separator.\n"); if (PAUSE) getchar(); } }#ifdef MACINTOSH /* prepend a ":" */ for (i = strlen(filename); i >= 0; i--) { filename[i + 1] = filename[i]; } filename[0] = ':';#endif#ifndef UNIX#ifndef AMIGA /* replace '/' with local separator */ for (i = strlen(filename); i >= 0; i--) { if (filename[i] == '/') filename[i] = dir_separator; }#endif#endif}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -